Spaces:
Runtime error
Runtime error
Download Dockerfile from z2learn/CaptionGenerator: direct link, hf CLI and curl.
- Browser
- Download file 737 Bytes
-
https://huggingface.co/spaces/z2learn/CaptionGenerator/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/z2learn/CaptionGenerator/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/z2learn/CaptionGenerator/resolve/main/Dockerfile
737 Bytes
| # -------------- Dockerfile -------------- | |
| # Use a lightweight Python base image | |
| FROM python:3.10-slim | |
| # Set a working directory inside the container | |
| WORKDIR /app | |
| # Copy only requirements first (to leverage Docker cache) | |
| COPY requirements.txt . | |
| # Upgrade pip and install Python dependencies | |
| RUN pip install --upgrade pip && \ | |
| pip install --no-cache-dir -r requirements.txt | |
| # Copy the application code into the container | |
| COPY app.py . | |
| # Expose the port that Gradio will listen on | |
| EXPOSE 7860 | |
| # Set environment variables so Gradio binds to 0.0.0.0 (all interfaces) | |
| ENV GRADIO_SERVER_NAME="0.0.0.0" | |
| ENV GRADIO_SERVER_PORT="7860" | |
| # Start the Gradio app | |
| CMD ["python", "app.py"] | |
| # -------------- End of Dockerfile -------------- | |