Update Dockerfile
Browse files- Dockerfile +11 -2
Dockerfile
CHANGED
|
@@ -2,16 +2,25 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
# Copy requirements first for better caching
|
| 6 |
COPY requirements.txt .
|
| 7 |
|
| 8 |
-
#
|
|
|
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
|
|
|
|
|
|
|
|
|
| 11 |
# Copy all files
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
-
# Expose port
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
# Run the app
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies first
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
gcc \
|
| 8 |
+
g++ \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
# Copy requirements first for better caching
|
| 12 |
COPY requirements.txt .
|
| 13 |
|
| 14 |
+
# Upgrade pip and install Python dependencies
|
| 15 |
+
RUN pip install --upgrade pip
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
+
# Verify streamlit is installed
|
| 19 |
+
RUN which streamlit && streamlit version
|
| 20 |
+
|
| 21 |
# Copy all files
|
| 22 |
COPY . .
|
| 23 |
|
|
|
|
| 24 |
EXPOSE 7860
|
| 25 |
|
| 26 |
# Run the app
|