GPTfree api commited on
Commit
6fcd23d
·
verified ·
1 Parent(s): 168c7ba

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -14
Dockerfile CHANGED
@@ -1,40 +1,38 @@
1
- # Use a base image with Python
2
  FROM python:3.9-slim
3
 
4
- # Set environment variables (Optional)
5
- ENV PYTHONUNBUFFERED=1
6
- ENV LANG C.UTF-8
7
-
8
- # Install required system dependencies (for Git, build tools, and others)
9
  RUN apt-get update && apt-get install -y \
10
  git \
11
  build-essential \
12
  g++ \
13
  python3-dev \
 
 
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # Upgrade pip to a compatible version to handle metadata issues
17
  RUN pip install --upgrade pip==23.3
18
 
19
- # Install fairseq and hydra-core separately to resolve dependencies
20
  RUN pip install fairseq==0.12.2
21
  RUN pip install hydra-core==1.0.7
 
22
 
23
- # Install a compatible version of omegaconf manually
24
- RUN pip install omegaconf==2.0.4
25
 
26
  # Clone the repository
27
  WORKDIR /app
28
  RUN git clone https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI
29
 
30
- # Set the working directory to the cloned repo
31
  WORKDIR /app/Retrieval-based-Voice-Conversion-WebUI
32
 
33
- # Install the remaining dependencies from requirements.txt
34
  RUN pip install -r requirements.txt
35
 
36
- # Expose the port that the web UI will use
37
  EXPOSE 7897
38
 
39
- # Update the CMD instruction to use the correct Python executable for Linux
40
  CMD ["python3", "infer-web.py", "--port", "7897"]
 
 
1
  FROM python:3.9-slim
2
 
3
+ # Install system dependencies
 
 
 
 
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
  build-essential \
7
  g++ \
8
  python3-dev \
9
+ ffmpeg \
10
+ libsndfile1 \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Upgrade pip to avoid metadata issues
14
  RUN pip install --upgrade pip==23.3
15
 
16
+ # Install necessary Python packages
17
  RUN pip install fairseq==0.12.2
18
  RUN pip install hydra-core==1.0.7
19
+ RUN pip install librosa==0.8.1 numba==0.53.0
20
 
21
+ # Disable numba JIT caching to avoid the error
22
+ ENV NUMBA_DISABLE_JIT=1
23
 
24
  # Clone the repository
25
  WORKDIR /app
26
  RUN git clone https://github.com/RVC-Project/Retrieval-based-Voice-Conversion-WebUI
27
 
28
+ # Set the working directory
29
  WORKDIR /app/Retrieval-based-Voice-Conversion-WebUI
30
 
31
+ # Install remaining dependencies from requirements.txt
32
  RUN pip install -r requirements.txt
33
 
34
+ # Expose the necessary port for the web interface
35
  EXPOSE 7897
36
 
37
+ # Run the application
38
  CMD ["python3", "infer-web.py", "--port", "7897"]