Spaces:
Runtime error
Runtime error
Download Dockerfile from kouki321/exampleone: direct link, hf CLI and curl.
- Browser
- Download file 646 Bytes
-
https://huggingface.co/spaces/kouki321/exampleone/resolve/7ddc2f8d89e5dc752cdbf091c04b94de71da8de7/Dockerfile
- Command line
-
hf download hf://spaces/kouki321/exampleone@7ddc2f8d89e5dc752cdbf091c04b94de71da8de7/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/kouki321/exampleone/resolve/7ddc2f8d89e5dc752cdbf091c04b94de71da8de7/Dockerfile
646 Bytes
| # Use a slim base image | |
| FROM python:3.10-slim | |
| # Install dependencies | |
| RUN apt-get update && \ | |
| apt-get install -y git && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Optional: copy requirements file and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy your app code into the container | |
| WORKDIR /app | |
| COPY app.py /app/app.py | |
| # Create a writable cache directory | |
| RUN mkdir -p /app/cache | |
| # Set environment variables for cache and disable root cache attempts | |
| ENV TRANSFORMERS_CACHE=/app/cache | |
| ENV HF_HOME=/app/cache | |
| # Expose port (for Gradio/Streamlit etc.) | |
| EXPOSE 7860 | |
| # Launch your app | |
| CMD ["python", "app.py"] |