Spaces:
Runtime error
Runtime error
Download Dockerfile from aioverlords-amnil/embed: direct link, hf CLI and curl.
- Browser
- Download file 736 Bytes
-
https://huggingface.co/spaces/aioverlords-amnil/embed/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/aioverlords-amnil/embed/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/aioverlords-amnil/embed/resolve/main/Dockerfile
736 Bytes
| # Use an official Python runtime as a parent image | |
| FROM python:3.9-slim | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy the requirements file and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Create cache and config directories with appropriate permissions | |
| RUN mkdir -p /app/cache && chmod 777 /app/cache | |
| RUN mkdir -p /app/config && chmod 777 /app/config | |
| # Set environment variables for Hugging Face cache and config directories | |
| ENV HF_HOME=/app/cache | |
| ENV XDG_CONFIG_HOME=/app/config | |
| # Copy the application code | |
| COPY main.py . | |
| # Expose the port FastAPI will run on | |
| EXPOSE 7860 | |
| # Command to run the FastAPI app | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |