versa / Dockerfile
ftshijt
set port for docker
58914ff
raw
history blame
991 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
build-essential \
libsndfile1 \
ffmpeg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -U pip && \
pip install --no-cache-dir -r requirements.txt
# Clone VERSA repository
RUN git clone https://github.com/wavlab-speech/versa.git && \
cd versa && \
pip install -e .
# Set up data directories
RUN mkdir -p /app/data/configs /app/data/uploads /app/data/results
# Copy universal metrics YAML file
COPY universal_metrics.yaml /app/data/configs/
# Copy application code
COPY app.py .
# Create installation complete indicator
RUN touch /app/versa/.installation_complete
# Set port
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
# Set environment variables
ENV PYTHONUNBUFFERED=1
# Run the application
CMD ["python", "app.py"]