Skip to content

Commit 5ab9d70

Browse files
Copilotericholscher
andcommitted
Update Docker configuration to Ubuntu 24.04 and uv package manager
Co-authored-by: ericholscher <[email protected]>
1 parent c74494e commit 5ab9d70

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docker-compose/django/Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:22.04
1+
FROM ubuntu:24.04
22

33
ENV DEBIAN_FRONTEND noninteractive
44
ENV LANG en_US.UTF-8
@@ -24,23 +24,26 @@ RUN apt-get -y install \
2424
libfreetype6 \
2525
libjpeg-dev \
2626
sqlite \
27-
netcat \
27+
netcat-openbsd \
2828
telnet \
2929
lsb-release
3030

31+
# Install uv for fast package management
32+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
33+
ENV PATH="/root/.cargo/bin:${PATH}"
34+
3135
# Requirements are installed here to ensure they will be cached.
3236
# https://docs.docker.com/build/cache/#use-the-dedicated-run-cache
3337
COPY ./requirements /requirements
34-
RUN pip install --upgrade pip
35-
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /requirements/development.txt
36-
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /requirements/production.txt
38+
RUN --mount=type=cache,target=/root/.cache/uv uv pip install --system -r /requirements/development.txt
39+
RUN --mount=type=cache,target=/root/.cache/uv uv pip install --system -r /requirements/production.txt
3740

3841
# Comment this if you don't need the page/topic analyzer.
3942
# The analyzer is used to target ads better based on page content.
4043
# Its requirements are huge and include PyTorch and other ML tools.
4144
# If not needed, make sure to set `ADSERVER_ANALYZER_BACKEND=` (empty string)
4245
# in your environment file `./envs/local/django`.
43-
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /requirements/analyzer.txt
46+
RUN --mount=type=cache,target=/root/.cache/uv uv pip install --system -r /requirements/analyzer.txt
4447

4548
COPY ./docker-compose/django/start /start
4649
RUN chmod +x /start

0 commit comments

Comments
 (0)