Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +4 -4
Dockerfile
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
-
# Set working directory
|
4 |
WORKDIR /app
|
5 |
|
6 |
-
# System dependencies
|
7 |
RUN apt-get update && apt-get install -y \
|
8 |
libgl1 \
|
9 |
libglib2.0-0 \
|
10 |
&& rm -rf /var/lib/apt/lists/*
|
11 |
|
12 |
-
# Copy files
|
13 |
COPY requirements.txt ./
|
|
|
|
|
|
|
|
|
14 |
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
|
16 |
COPY app.py .
|
17 |
|
18 |
EXPOSE 5000
|
19 |
-
|
20 |
CMD ["python", "app.py"]
|
|
|
1 |
FROM python:3.10-slim
|
2 |
|
|
|
3 |
WORKDIR /app
|
4 |
|
|
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
libgl1 \
|
7 |
libglib2.0-0 \
|
8 |
&& rm -rf /var/lib/apt/lists/*
|
9 |
|
|
|
10 |
COPY requirements.txt ./
|
11 |
+
|
12 |
+
# Install torch & torchvision from PyTorch CPU wheels
|
13 |
+
RUN pip install --no-cache-dir torch==2.0.1+cpu torchvision==0.15.2+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
|
14 |
+
|
15 |
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
|
17 |
COPY app.py .
|
18 |
|
19 |
EXPOSE 5000
|
|
|
20 |
CMD ["python", "app.py"]
|