voiceclone-dev / Dockerfile
crackuser's picture
Update Dockerfile
5706e71 verified
raw
history blame
1.09 kB
FROM python:3.10-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libsndfile1 \
ffmpeg \
libavcodec-extra \
espeak \
espeak-data \
libespeak1 \
libespeak-dev \
wget \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Upgrade pip and install requirements
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Create directories for models and outputs
RUN mkdir -p /app/models
RUN mkdir -p /app/outputs
RUN mkdir -p /app/reference_voices
RUN mkdir -p /app/temp
# Set environment variables
ENV PYTHONPATH=/app
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
# Expose port
EXPOSE 8501
# Health check
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# Run the application
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]