antonymilne commited on
Commit
8905c29
·
verified ·
1 Parent(s): 05d12cb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -14
Dockerfile CHANGED
@@ -1,18 +1,9 @@
1
- # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
-
4
- FROM python:3.12
5
-
6
- RUN useradd -m -u 1000 user
7
 
8
  WORKDIR /app
9
 
10
- COPY --chown=user ./requirements.txt requirements.txt
11
-
12
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
13
-
14
- COPY --chown=user . /app
15
-
16
- EXPOSE 7860
17
 
18
- CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:server"]
 
1
+ FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
 
 
 
 
 
2
 
3
  WORKDIR /app
4
 
5
+ COPY requirements.txt .
6
+ RUN uv pip sync --system requirements.txt
7
+ COPY . .
 
 
 
 
8
 
9
+ ENTRYPOINT ["gunicorn", "app:app", "--workers", "4", "--bind", "0.0.0.0:7860"]