Realtime-API / Dockerfile
Echo-ai
Update Dockerfile
d244e05 verified
raw
history blame
776 Bytes
# Use a lightweight Python base image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies (e.g., for edge-tts or audio handling if needed)
RUN apt-get update && apt-get install -y \
wget \
&& rm -rf /var/lib/apt/lists/*
# Download the code and requirements from Hugging Face
RUN wget -O edge_tts-api.py "https://huggingface.co/datasets/gefiwek187/realtime-api/resolve/main/edge_tts-api.py" \
&& wget -O requirements.txt "https://huggingface.co/datasets/gefiwek187/realtime-api/resolve/main/edge-tts-requirements.txt"
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose the port Hugging Face Spaces expects
EXPOSE 7860
# Command to run the FastAPI app
CMD ["python", "edge_tts-api.py"]