Spaces:
No application file
No application file
Download dockerfile from Subhaaamsage/Play_crypto: direct link, hf CLI and curl.
- Browser
- Download file 866 Bytes
-
https://huggingface.co/spaces/Subhaaamsage/Play_crypto/resolve/main/dockerfile
- Command line
-
hf download hf://spaces/Subhaaamsage/Play_crypto/dockerfile
-
curl -L -o dockerfile https://huggingface.co/spaces/Subhaaamsage/Play_crypto/resolve/main/dockerfile
866 Bytes
| # Use official Python slim image | |
| FROM python:3.9-slim | |
| # Install curl (for healthcheck) as root | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create non-root user and set environment | |
| RUN useradd -m -u 1000 app | |
| USER app | |
| ENV HOME=/home/app \ | |
| PATH=/home/app/.local/bin:$PATH | |
| # Set working directory | |
| WORKDIR /home/app | |
| # Copy and install dependencies | |
| COPY --chown=app:app requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY --chown=app:app . ./ | |
| # Expose Streamlit port | |
| EXPOSE 7860 | |
| # Optional healthcheck (runs as app user) | |
| HEALTHCHECK --interval=30s --timeout=5s \ | |
| CMD curl --fail http://localhost:7860/_stcore/health || exit 1 | |
| # Launch the Streamlit app | |
| CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |