Spaces:
Sleeping
Sleeping
Download Dockerfile from Shafiq786/video-compressor: direct link, hf CLI and curl.
- Browser
- Download file 822 Bytes
-
https://huggingface.co/spaces/Shafiq786/video-compressor/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Shafiq786/video-compressor/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Shafiq786/video-compressor/resolve/main/Dockerfile
822 Bytes
| # Step 1: Python image use karein | |
| FROM python:3.9-slim | |
| # Step 2: System updates aur FFmpeg install karein (Video fix ke liye zaroori hai) | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Step 3: Working directory set karein | |
| WORKDIR /app | |
| # Step 4: Requirements copy karke install karein | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Step 5: Saara code copy karein | |
| COPY . . | |
| # Step 6: Upload aur Process folders ko permissions dein | |
| RUN mkdir -p uploads_compress processed_compress && chmod 777 uploads_compress processed_compress | |
| # Step 7: Hugging Face ke default port 7860 par run karein | |
| # SocketIO ke liye eventlet worker use karna best rehta hai | |
| CMD ["gunicorn", "--worker-class", "eventlet", "-w", "1", "--bind", "0.0.0.0:7860", "app:app"] | |