Update Dockerfile
Browse files- Dockerfile +3 -7
Dockerfile
CHANGED
|
@@ -18,12 +18,8 @@ WORKDIR /app
|
|
| 18 |
# Copy requirements first so Docker can cache the pip layer
|
| 19 |
COPY requirements.txt .
|
| 20 |
|
| 21 |
-
# Install
|
| 22 |
-
RUN pip install --no-cache-dir
|
| 23 |
-
torch==2.2.2+cpu \
|
| 24 |
-
torchvision==0.17.2+cpu \
|
| 25 |
-
--index-url https://download.pytorch.org/whl/cpu \
|
| 26 |
-
&& pip install --no-cache-dir -r requirements.txt
|
| 27 |
|
| 28 |
# Copy all app files (app.py, index.html, model.pt if present)
|
| 29 |
COPY . .
|
|
@@ -32,4 +28,4 @@ COPY . .
|
|
| 32 |
EXPOSE 7860
|
| 33 |
|
| 34 |
# Run the Flask server
|
| 35 |
-
CMD ["python", "app.py"]
|
|
|
|
| 18 |
# Copy requirements first so Docker can cache the pip layer
|
| 19 |
COPY requirements.txt .
|
| 20 |
|
| 21 |
+
# Install ALL python deps in ONE pip call to avoid numpy conflicts
|
| 22 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
# Copy all app files (app.py, index.html, model.pt if present)
|
| 25 |
COPY . .
|
|
|
|
| 28 |
EXPOSE 7860
|
| 29 |
|
| 30 |
# Run the Flask server
|
| 31 |
+
CMD ["python", "app.py"]
|