Spaces:
Sleeping
Sleeping
Download Dockerfile from limitedonly41/Category_AI_Scraper: direct link, hf CLI and curl.
- Browser
- Download file 632 Bytes
-
https://huggingface.co/spaces/limitedonly41/Category_AI_Scraper/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/limitedonly41/Category_AI_Scraper/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/limitedonly41/Category_AI_Scraper/resolve/main/Dockerfile
632 Bytes
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| redis-server \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements file | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy only main.py (code will be downloaded from model repo) | |
| COPY main.py . | |
| # Expose port 7860 (required by Hugging Face Spaces) | |
| EXPOSE 7860 | |
| # Create a startup script | |
| RUN echo '#!/bin/bash\n\ | |
| redis-server --daemonize yes\n\ | |
| sleep 2\n\ | |
| python main.py\n\ | |
| ' > /start.sh && chmod +x /start.sh | |
| # Run the startup script | |
| CMD ["/start.sh"] |