Skip to content

Commit 79f3624

Browse files
committed
use uv in docker image
1 parent 9152c1e commit 79f3624

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# syntax=docker/dockerfile:1
2-
FROM python:3.9
2+
FROM ubuntu:24.04
33

44
WORKDIR /app
55

6-
COPY requirements.txt /app/requirements.txt
6+
ENV PATH="/root/.local/bin/:$PATH"
7+
COPY . /app
8+
9+
RUN apt-get update && apt-get install -y curl ca-certificates libmagic1 && curl -LsSf https://astral.sh/uv/install.sh | sh \
10+
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
11+
&& uv sync --no-dev
712

8-
RUN pip3 install --no-cache-dir --upgrade -r /app/requirements.txt
913

10-
COPY . /app
1114

12-
CMD [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
15+
CMD [ "uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]

0 commit comments

Comments
 (0)