Spaces:
Runtime error
Runtime error
Download Dockerfile from Dewasheesh/model-deployment: direct link, hf CLI and curl.
- Browser
- Download file 538 Bytes
-
https://huggingface.co/spaces/Dewasheesh/model-deployment/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Dewasheesh/model-deployment/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Dewasheesh/model-deployment/resolve/main/Dockerfile
538 Bytes
| # 1. Use a minimal Python 3.9 image | |
| FROM python:3.9-slim | |
| # 2. Set working directory | |
| WORKDIR /app | |
| # 3. Copy all files | |
| COPY . . | |
| # 4. Install requirements | |
| RUN pip install --no-cache-dir --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| # 5. Environment variables required by Hugging Face Spaces | |
| ENV STREAMLIT_SERVER_PORT=7860 | |
| ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0 | |
| ENV STREAMLIT_SERVER_ENABLE_CORS=false | |
| ENV STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false | |
| # 6. Launch streamlit correctly | |
| CMD ["streamlit", "run", "app.py"] | |