Spaces:
Sleeping
Sleeping
File size: 911 Bytes
42c0c58 056c59e 42c0c58 73732eb 42c0c58 056c59e 42c0c58 056c59e 42c0c58 056c59e 42c0c58 056c59e 42c0c58 056c59e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # Dockerfile โ Hugging Face Space (Streamlit + env-var secrets)
FROM python:3.11-slim
# sane defaults + make Streamlit write under /app
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
HOME=/app \
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
WORKDIR /app
RUN mkdir -p /app/.streamlit
# Python deps
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# App code
COPY . .
# Streamlit on 8501
EXPOSE 8501
# Healthcheck without curl
HEALTHCHECK CMD python -c "import urllib.request as u; u.urlopen('http://localhost:8501/_stcore/health')" || exit 1
# <<< IMPORTANT: set your actual entry file here >>>
# If your main file is literally named '๐ _Home.py', keep this line.
# If it's '_Home.py' or 'app.py', change it accordingly.
ENTRYPOINT ["streamlit", "run", "๐ _Home.py", "--server.port=8501", "--server.address=0.0.0.0"]
|