Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +23 -3
Dockerfile
CHANGED
|
@@ -1,9 +1,29 @@
|
|
| 1 |
FROM python:3.8
|
|
|
|
|
|
|
| 2 |
EXPOSE 8501
|
|
|
|
|
|
|
| 3 |
WORKDIR /app
|
|
|
|
|
|
|
| 4 |
COPY requirements.txt ./requirements.txt
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
RUN pip3 install -r requirements.txt
|
|
|
|
|
|
|
| 8 |
COPY . .
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.8
|
| 2 |
+
|
| 3 |
+
# Expose port 8501
|
| 4 |
EXPOSE 8501
|
| 5 |
+
|
| 6 |
+
# Set working directory
|
| 7 |
WORKDIR /app
|
| 8 |
+
|
| 9 |
+
# Copy requirements file
|
| 10 |
COPY requirements.txt ./requirements.txt
|
| 11 |
+
|
| 12 |
+
# Install system dependencies
|
| 13 |
+
RUN apt-get update && \
|
| 14 |
+
apt-get install -y ffmpeg libsm6 libxext6
|
| 15 |
+
|
| 16 |
+
# Install Python dependencies
|
| 17 |
RUN pip3 install -r requirements.txt
|
| 18 |
+
|
| 19 |
+
# Copy the application code
|
| 20 |
COPY . .
|
| 21 |
+
|
| 22 |
+
# Set the PORT environment variable
|
| 23 |
+
ENV PORT=8501
|
| 24 |
+
|
| 25 |
+
# Set the MPLCONFIGDIR environment variable
|
| 26 |
+
ENV MPLCONFIGDIR=/tmp/matplotlib-cache
|
| 27 |
+
|
| 28 |
+
# Command to run the Streamlit app
|
| 29 |
+
CMD streamlit run --server.port $PORT app.py
|