mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-16 13:20:39 -07:00
- Introduced Docker support with CPU-only and GPU-enabled configurations via Dockerfiles and docker-compose files. - Added a .dockerignore file to exclude unnecessary files from Docker images. - Updated bun.lock and package.json to include new dependencies for icon handling. - Enhanced README with Docker usage instructions and deployment options. - Refactored components to utilize new icon libraries for improved UI consistency.
39 lines
1.0 KiB
Docker
39 lines
1.0 KiB
Docker
# Base Dockerfile for Voicebox (CPU-only)
|
|
# For GPU support, use Dockerfile.cuda
|
|
|
|
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
ffmpeg \
|
|
curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy backend
|
|
COPY backend/ /app/backend/
|
|
COPY providers/ /app/providers/
|
|
|
|
# Copy pre-built web UI
|
|
COPY web/dist/ /app/web/dist/
|
|
|
|
# Install Python dependencies (without PyTorch - will be downloaded via provider system)
|
|
RUN python -m pip install --upgrade pip && \
|
|
pip install --no-cache-dir \
|
|
fastapi uvicorn[standard] pydantic sqlalchemy alembic \
|
|
librosa soundfile numpy python-multipart Pillow \
|
|
huggingface_hub transformers accelerate
|
|
|
|
# Create data directory for profiles/generations
|
|
RUN mkdir -p /app/data
|
|
|
|
# Health check
|
|
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=40s \
|
|
CMD curl -f http://localhost:8000/health || exit 1
|
|
|
|
EXPOSE 8000
|
|
|
|
# Run server with web UI
|
|
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
|