Download Dockerfile from michdubai/edgetts: direct link, hf CLI and curl.
- Browser
- Download file 779 Bytes
-
https://huggingface.co/spaces/michdubai/edgetts/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/michdubai/edgetts/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/michdubai/edgetts/resolve/main/Dockerfile
779 Bytes
| # Use an official lightweight Python runtime | |
| FROM python:3.10-slim | |
| # Set system environment variables to prevent Python from writing pyc files and buffering logs | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PORT=7860 | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # Install required pip packages directly | |
| # No need for a separate requirements.txt file, keeping deployment simple | |
| RUN pip install --no-cache-dir \ | |
| fastapi \ | |
| uvicorn \ | |
| pydantic \ | |
| edge-tts | |
| # Copy your server script into the container | |
| # Ensure your python script is named 'server.py' in your repository | |
| COPY app.py /app/app.py | |
| # Expose the internal Hugging Face port | |
| EXPOSE 7860 | |
| # Run the FastAPI application using Uvicorn on container startup | |
| CMD ["python", "app.py"] |