Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -12
Dockerfile
CHANGED
|
@@ -1,33 +1,31 @@
|
|
| 1 |
-
# Use Python 3.10 (
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Set
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install
|
|
|
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
build-essential \
|
| 10 |
curl \
|
| 11 |
-
software-properties-common \
|
| 12 |
git \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
-
# Copy requirements
|
| 16 |
COPY requirements.txt .
|
| 17 |
|
| 18 |
-
# Install Python
|
| 19 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
# Copy EVERYTHING from your current folder to the container
|
| 23 |
-
# This ensures app.py, config.py, agents.py, and utils.py are all copied.
|
| 24 |
COPY . .
|
| 25 |
|
| 26 |
-
#
|
| 27 |
EXPOSE 8501
|
| 28 |
|
| 29 |
-
# Healthcheck
|
| 30 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 31 |
|
| 32 |
-
#
|
| 33 |
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
# Use Python 3.10-slim (More stable/compatible than 3.13 for OR-Tools)
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install only the absolute necessities
|
| 8 |
+
# REMOVED: software-properties-common (this was causing your error)
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
build-essential \
|
| 11 |
curl \
|
|
|
|
| 12 |
git \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
+
# Copy requirements first (for caching)
|
| 16 |
COPY requirements.txt .
|
| 17 |
|
| 18 |
+
# Install Python dependencies
|
| 19 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 20 |
|
| 21 |
+
# Copy ALL your application files (app.py, config.py, agents.py, utils.py)
|
|
|
|
|
|
|
| 22 |
COPY . .
|
| 23 |
|
| 24 |
+
# Open the port
|
| 25 |
EXPOSE 8501
|
| 26 |
|
| 27 |
+
# Healthcheck
|
| 28 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 29 |
|
| 30 |
+
# Run the app
|
| 31 |
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|