Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -0
Dockerfile
CHANGED
|
@@ -2,11 +2,20 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
|
|
|
| 8 |
COPY . .
|
| 9 |
|
|
|
|
| 10 |
EXPOSE 8501
|
| 11 |
|
|
|
|
| 12 |
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies for torch and matplotlib
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
libgomp1 \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
# Install Python dependencies
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
+
# Copy application files
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
+
# Expose Streamlit port
|
| 18 |
EXPOSE 8501
|
| 19 |
|
| 20 |
+
# Run Streamlit app
|
| 21 |
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|