explore_Chinese / Dockerfile
AimanGh's picture
Update Dockerfile
42c0c58 verified
Raw History Blame
911 Bytes
# 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"]