forked from zaigie/FunSpeech
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.gpu
More file actions
41 lines (30 loc) · 1.09 KB
/
Copy pathDockerfile.gpu
File metadata and controls
41 lines (30 loc) · 1.09 KB
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
33
34
35
36
37
38
39
40
41
FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
HF_HUB_DISABLE_SYMLINKS_WARNING=1 \
HF_HUB_DISABLE_PROGRESS_BARS=1
# Install system packages required for audio processing
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
sox \
libsox-dev \
libsndfile1 \
build-essential
WORKDIR /app
RUN pip install --no-cache-dir --upgrade pip
# Install Python dependencies
COPY dependencies/requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt
COPY dependencies/CosyVoice/requirements-gpu.txt /tmp/requirements-cosyvoice.txt
RUN pip install --no-cache-dir -r /tmp/requirements-cosyvoice.txt
# Clean apt packages and cache
RUN apt remove -y build-essential && apt autoremove -y \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Copy application code
COPY . .
# Create runtime directories
RUN mkdir -p /app/temp /app/voices /app/logs \
&& chmod +x start.py
EXPOSE 8000
CMD ["python", "start.py"]