Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -1,18 +1,19 @@
|
|
| 1 |
-
# Use
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
#
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
curl \
|
| 9 |
git \
|
| 10 |
libffi-dev \
|
|
|
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
# Copy and install dependencies
|
| 14 |
COPY requirements.txt ./
|
| 15 |
-
#
|
| 16 |
RUN pip3 install --no-cache-dir --force-reinstall -r requirements.txt
|
| 17 |
|
| 18 |
# Copy application source code
|
|
|
|
| 1 |
+
# Use the official PyTorch base image (CPU-only version)
|
| 2 |
+
FROM pytorch/pytorch:2.0.1-cpu
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Install necessary system packages for Streamlit and Git
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
curl \
|
| 9 |
git \
|
| 10 |
libffi-dev \
|
| 11 |
+
libssl-dev \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
+
# Copy and install ONLY non-torch dependencies (torch is already installed)
|
| 15 |
COPY requirements.txt ./
|
| 16 |
+
# Install non-torch dependencies, ignoring any torch/cuda mentions
|
| 17 |
RUN pip3 install --no-cache-dir --force-reinstall -r requirements.txt
|
| 18 |
|
| 19 |
# Copy application source code
|