Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +10 -28
Dockerfile
CHANGED
|
@@ -1,38 +1,20 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
| 3 |
-
# -----------------------------
|
| 4 |
-
FROM python:3.10-slim
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
# Set working directory
|
| 8 |
-
# -----------------------------
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
#
|
| 12 |
-
# Copy app files
|
| 13 |
-
# -----------------------------
|
| 14 |
COPY . /app
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
# Upgrade pip and install dependencies
|
| 18 |
-
# -----------------------------
|
| 19 |
RUN pip install --upgrade pip
|
| 20 |
|
| 21 |
-
# Install
|
| 22 |
-
RUN pip install
|
| 23 |
-
streamlit==1.30.0 \
|
| 24 |
-
tensorflow==2.13.0 \
|
| 25 |
-
numpy==1.24.4 \
|
| 26 |
-
pandas==2.1.0 \
|
| 27 |
-
pillow==10.0.0 \
|
| 28 |
-
joblib==1.3.2
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
# Expose Streamlit port
|
| 32 |
-
# -----------------------------
|
| 33 |
EXPOSE 8501
|
| 34 |
|
| 35 |
-
#
|
| 36 |
-
|
| 37 |
-
# -----------------------------
|
| 38 |
-
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
# Use official Python 3.11 slim image
|
| 2 |
+
FROM python:3.11-slim
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
# Set working directory inside the container
|
|
|
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy all local files to container
|
|
|
|
|
|
|
| 8 |
COPY . /app
|
| 9 |
|
| 10 |
+
# Upgrade pip
|
|
|
|
|
|
|
| 11 |
RUN pip install --upgrade pip
|
| 12 |
|
| 13 |
+
# Install dependencies from requirements.txt
|
| 14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
# Expose default Streamlit port
|
|
|
|
|
|
|
| 17 |
EXPOSE 8501
|
| 18 |
|
| 19 |
+
# Command to run the Streamlit app
|
| 20 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.enableCORS=false"]
|
|
|
|
|
|