Skip to content

Commit a8a7dd9

Browse files
Update Dockerfile.ml
1 parent a24cb09 commit a8a7dd9

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Dockerfile.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ FROM python:3.11-slim
22

33
WORKDIR /app
44

5-
# Install system deps needed by opencv + retina-face
5+
# Install system deps needed by opencv + retinaface
66
RUN apt-get update && apt-get install -y --no-install-recommends \
77
libglib2.0-0 \
88
libgl1 \
99
&& rm -rf /var/lib/apt/lists/*
1010

1111
COPY ml/requirements.txt .
1212

13-
# CPU-only torch first (heaviest, benefits most from layer caching)
13+
# CPU-only torch — pinned to 2.4.0 (numpy 2.x compatible, transformers compatible)
1414
RUN pip install --no-cache-dir --default-timeout=300 --retries=5 \
15-
torch==2.2.2+cpu torchvision==0.17.2+cpu \
15+
torch==2.4.0+cpu torchvision==0.19.0+cpu \
1616
--index-url https://download.pytorch.org/whl/cpu
1717

1818
# Rest of deps
@@ -22,4 +22,4 @@ RUN pip install --no-cache-dir --default-timeout=300 --retries=5 \
2222
COPY ml ./ml
2323
COPY shared/ ./shared/
2424

25-
CMD ["uvicorn", "ml.main:app", "--host", "0.0.0.0", "--port", "8001"]
25+
CMD ["uvicorn", "ml.main:app", "--host", "0.0.0.0", "--port", "8001"]

0 commit comments

Comments
 (0)