Spaces:
Sleeping
Sleeping
Download Dockerfile from athv/auto-code-optimizer: direct link, hf CLI and curl.
- Browser
- Download file 484 Bytes
-
https://huggingface.co/spaces/athv/auto-code-optimizer/resolve/e389ca1a9bbff7fa83de871e0cceffb553c070ee/Dockerfile
- Command line
-
hf download hf://spaces/athv/auto-code-optimizer@e389ca1a9bbff7fa83de871e0cceffb553c070ee/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/athv/auto-code-optimizer/resolve/e389ca1a9bbff7fa83de871e0cceffb553c070ee/Dockerfile
484 Bytes
| # Use Python 3.9 | |
| FROM python:3.9 | |
| # Set working directory | |
| WORKDIR /app | |
| # Copy requirements and install them | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the server code | |
| COPY server.py . | |
| # Create a cache directory for the model (fixes permission errors) | |
| RUN mkdir -p /app/cache | |
| ENV HF_HOME=/app/cache | |
| RUN chmod -R 777 /app/cache | |
| # Expose the port Hugging Face uses | |
| EXPOSE 7860 | |
| # Run the server | |
| CMD ["python", "server.py"] |