Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -6
Dockerfile
CHANGED
|
@@ -1,17 +1,18 @@
|
|
| 1 |
-
#
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
# Install necessary system packages
|
|
|
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
curl \
|
| 9 |
git \
|
| 10 |
-
build-essential \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
#
|
| 14 |
COPY requirements.txt ./
|
|
|
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
# Copy application source code
|
|
@@ -19,6 +20,4 @@ COPY src/ ./src/
|
|
| 19 |
|
| 20 |
EXPOSE 8501
|
| 21 |
|
| 22 |
-
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 23 |
-
|
| 24 |
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
# Use a highly compatible Python version (3.10 is stable for ML libs)
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Install necessary system packages
|
| 7 |
+
# No special sentencepiece/cmake tools needed here anymore
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
curl \
|
| 10 |
git \
|
|
|
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
+
# Copy and install ALL dependencies
|
| 14 |
COPY requirements.txt ./
|
| 15 |
+
# We use --no-cache-dir to prevent disk space issues
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
# Copy application source code
|
|
|
|
| 20 |
|
| 21 |
EXPOSE 8501
|
| 22 |
|
|
|
|
|
|
|
| 23 |
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|