Spaces:
Runtime error
Runtime error
Download Dockerfile from ehsanhon/AI-physical-trainer-beta: direct link, hf CLI and curl.
- Browser
- Download file 796 Bytes
-
https://huggingface.co/spaces/ehsanhon/AI-physical-trainer-beta/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ehsanhon/AI-physical-trainer-beta/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ehsanhon/AI-physical-trainer-beta/resolve/main/Dockerfile
796 Bytes
| FROM python:3.10-slim | |
| # Install system dependencies (GUI, audio, media support) | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxrender1 \ | |
| libxext6 \ | |
| ffmpeg \ | |
| libportaudio2 \ | |
| libasound2-dev \ | |
| libsndfile1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Set environment variables to avoid permission issues | |
| ENV MPLCONFIGDIR=/tmp/matplotlib | |
| ENV PYTHONUNBUFFERED=1 | |
| # Copy all project files | |
| COPY . . | |
| # Install dependencies | |
| RUN pip install --upgrade pip | |
| RUN pip install -r requirements.txt | |
| # Make sure ffmpeg is linked for pydub | |
| ENV PATH="/usr/bin/ffmpeg:$PATH" | |
| # Expose port as expected by Hugging Face | |
| EXPOSE 7860 | |
| # Run FastAPI app | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |