Update Dockerfile
Browse files- Dockerfile +14 -3
Dockerfile
CHANGED
|
@@ -2,12 +2,23 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
|
|
|
|
|
|
|
|
|
| 6 |
COPY requirements.txt .
|
| 7 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
|
| 9 |
# Copy application files
|
| 10 |
COPY . .
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# System dependencies (optional)
|
| 6 |
+
RUN apt-get update && apt-get install -y build-essential && rm -rf /var/lib/apt/lists/*
|
| 7 |
+
|
| 8 |
+
# Install Python dependencies
|
| 9 |
COPY requirements.txt .
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
# Copy application files
|
| 13 |
COPY . .
|
| 14 |
|
| 15 |
+
# Set Streamlit environment variables
|
| 16 |
+
ENV STREAMLIT_SERVER_HEADLESS=true
|
| 17 |
+
ENV STREAMLIT_SERVER_ENABLECORS=false
|
| 18 |
+
ENV STREAMLIT_SERVER_PORT=7860
|
| 19 |
+
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
| 20 |
+
|
| 21 |
+
EXPOSE 7860
|
| 22 |
+
|
| 23 |
+
# Start the app
|
| 24 |
+
CMD ["streamlit", "run", "app.py"]
|