Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +18 -15
Dockerfile
CHANGED
|
@@ -1,28 +1,31 @@
|
|
| 1 |
-
FROM python:3.9-slim
|
|
|
|
| 2 |
|
| 3 |
# Set environment variables to avoid caching issues with Hugging Face
|
| 4 |
-
ENV HF_HOME=/tmp/huggingface \
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
-
RUN
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
COPY requirements.txt ./
|
| 20 |
COPY src/ ./src/
|
| 21 |
|
| 22 |
-
RUN pip3 install -r requirements.txt
|
| 23 |
-
|
| 24 |
EXPOSE 7860
|
| 25 |
|
|
|
|
|
|
|
| 26 |
# HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 27 |
|
| 28 |
-
CMD ["streamlit", "run", "src/model_consumer.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
#FROM python:3.9-slim
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
|
| 4 |
# Set environment variables to avoid caching issues with Hugging Face
|
| 5 |
+
# ENV HF_HOME=/tmp/huggingface \
|
| 6 |
+
# TRANSFORMERS_CACHE=/tmp/huggingface/transformers \
|
| 7 |
+
# HF_DATASETS_CACHE=/tmp/huggingface/datasets \
|
| 8 |
+
# HUGGINGFACE_HUB_CACHE=/tmp/huggingface/hub \
|
| 9 |
+
# XDG_CACHE_HOME=/tmp/huggingface
|
| 10 |
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
+
|
| 15 |
+
# RUN apt-get update && apt-get install -y \
|
| 16 |
+
# build-essential \
|
| 17 |
+
# curl \
|
| 18 |
+
# software-properties-common \
|
| 19 |
+
# git \
|
| 20 |
+
# && rm -rf /var/lib/apt/lists/*
|
| 21 |
|
| 22 |
COPY requirements.txt ./
|
| 23 |
COPY src/ ./src/
|
| 24 |
|
|
|
|
|
|
|
| 25 |
EXPOSE 7860
|
| 26 |
|
| 27 |
+
ENV PYTHONUNBUFFERED=1
|
| 28 |
+
|
| 29 |
# HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 30 |
|
| 31 |
+
CMD ["streamlit", "run", "./src/model_consumer.py", "--server.port=7860", "--server.address=0.0.0.0"]
|