Spaces:
Running
Running
File size: 754 Bytes
b226bb6 914b807 b226bb6 a69de93 b226bb6 a69de93 b226bb6 914b807 b226bb6 21a158f b226bb6 21a158f b226bb6 914b807 b226bb6 80e1c62 fb6c9af b226bb6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# Dockerfile
FROM python:3.11-slim
# Install system dependencies for audio processing
RUN apt-get update && apt-get install -y \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY gemini_tts_api.py .
# Create directory for audio files
RUN mkdir -p audio_files
# Expose port
EXPOSE 7860
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV GEMINI_API_KEY=""
ENV GEMINI_API_KEYS=""
# Support for individual API keys: GEMINI_API_KEY_1, GEMINI_API_KEY_2, etc.
# Run the application
CMD ["uvicorn", "gemini_tts_api:app", "--host", "0.0.0.0", "--port", "7860"] |