silent-utils-api / Dockerfile
Fdgg55's picture
Update Dockerfile
97bd74b verified
Raw
History Blame Contribute Delete
654 Bytes
FROM python:3.9-slim
# Install FFmpeg for Voice/Video
RUN apt-get update && apt-get install -y ffmpeg git && rm -rf /var/lib/apt/lists/*
WORKDIR /app
ENV XDG_CACHE_HOME=/tmp
# Install Python packages
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Pre-download the Voice Model
RUN python -c "import whisper; whisper.load_model('base')"
# Pre-download the Uncensored Image Model
RUN python -c "from diffusers import StableDiffusionPipeline; StableDiffusionPipeline.from_pretrained('prompthero/openjourney', safety_checker=None)"
COPY app.py .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]