Spaces:
Runtime error
Runtime error
- Dockerfile +45 -0
Dockerfile
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Base CUDA image
|
2 |
+
FROM cnstark/pytorch:2.0.1-py3.9.17-cuda11.8.0-ubuntu20.04
|
3 |
+
|
4 |
+
LABEL maintainer="breakstring@hotmail.com"
|
5 |
+
LABEL version="dev-20240209"
|
6 |
+
LABEL description="Docker image for GPT-SoVITS"
|
7 |
+
|
8 |
+
|
9 |
+
# Install 3rd party apps
|
10 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
11 |
+
ENV TZ=Etc/UTC
|
12 |
+
RUN apt-get update && \
|
13 |
+
apt-get install -y --no-install-recommends tzdata ffmpeg libsox-dev parallel aria2 git git-lfs && \
|
14 |
+
git lfs install && \
|
15 |
+
rm -rf /var/lib/apt/lists/*
|
16 |
+
|
17 |
+
# Copy only requirements.txt initially to leverage Docker cache
|
18 |
+
WORKDIR /workspace
|
19 |
+
COPY requirements.txt /workspace/
|
20 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
21 |
+
|
22 |
+
# Define a build-time argument for image type
|
23 |
+
ARG IMAGE_TYPE=full
|
24 |
+
|
25 |
+
# Conditional logic based on the IMAGE_TYPE argument
|
26 |
+
# Always copy the Docker directory, but only use it if IMAGE_TYPE is not "elite"
|
27 |
+
COPY ./Docker /workspace/Docker
|
28 |
+
# elite η±»εηιειι’δΈε
ε«ι’ε€η樑ε
|
29 |
+
RUN if [ "$IMAGE_TYPE" != "elite" ]; then \
|
30 |
+
chmod +x /workspace/Docker/download.sh && \
|
31 |
+
/workspace/Docker/download.sh && \
|
32 |
+
python /workspace/Docker/download.py && \
|
33 |
+
python -m nltk.downloader averaged_perceptron_tagger cmudict; \
|
34 |
+
fi
|
35 |
+
|
36 |
+
|
37 |
+
# Copy the rest of the application
|
38 |
+
COPY . /workspace
|
39 |
+
|
40 |
+
# Copy the rest of the application
|
41 |
+
COPY . /workspace
|
42 |
+
|
43 |
+
EXPOSE 9871 9872 9873 9874 9880
|
44 |
+
|
45 |
+
CMD ["python", "webui.py"]
|