Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -11
Dockerfile
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
FROM python:3.13.5-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
# Install system dependencies
|
|
@@ -9,21 +10,18 @@ RUN apt-get update && apt-get install -y \
|
|
| 9 |
git \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
# Copy requirements and install
|
| 13 |
COPY requirements.txt ./
|
| 14 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
-
# Copy
|
| 17 |
-
COPY
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
WORKDIR /app/src
|
| 21 |
-
|
| 22 |
-
# Expose port for FastAPI
|
| 23 |
EXPOSE 8501
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
HEALTHCHECK CMD curl --fail http://localhost:8501/ || exit 1
|
| 27 |
|
| 28 |
-
# Run
|
| 29 |
-
ENTRYPOINT ["
|
|
|
|
| 1 |
FROM python:3.13.5-slim
|
| 2 |
|
| 3 |
+
# Set working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
# Install system dependencies
|
|
|
|
| 10 |
git \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
+
# Copy requirements and install Python dependencies
|
| 14 |
COPY requirements.txt ./
|
| 15 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
+
# Copy the app directly
|
| 18 |
+
COPY app.py ./
|
| 19 |
|
| 20 |
+
# Expose Streamlit default port
|
|
|
|
|
|
|
|
|
|
| 21 |
EXPOSE 8501
|
| 22 |
|
| 23 |
+
# Healthcheck for the Space
|
| 24 |
+
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
| 25 |
|
| 26 |
+
# Run Streamlit
|
| 27 |
+
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|