moustafa1-1 commited on
Commit
cab81cf
·
verified ·
1 Parent(s): b134cba

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +39 -3
Dockerfile CHANGED
@@ -1,8 +1,44 @@
1
  FROM python:3.9-slim-buster
2
  WORKDIR /app
3
  COPY . /app/
4
- RUN apt-get update && apt-get install -y git
 
5
  RUN git submodule init
6
  RUN git submodule update
7
- RUN ls -al /app/TTS
8
- CMD ["echo", "Submodule test complete"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  FROM python:3.9-slim-buster
2
  WORKDIR /app
3
  COPY . /app/
4
+
5
+ # Initialize and update submodules
6
  RUN git submodule init
7
  RUN git submodule update
8
+
9
+ WORKDIR /app/TTS
10
+
11
+ # Set environment variables
12
+ ENV BLIS_ARCH="haswell"
13
+ ENV COQUI_TTS_AGREED="yes"
14
+
15
+ # Create and activate virtual environment
16
+ RUN python3 -m venv .venv
17
+ RUN . .venv/bin/activate
18
+
19
+ # Install Coqui TTS requirements
20
+ COPY TTS/requirements.txt .
21
+ RUN pip install -r requirements.txt
22
+
23
+ # Explicitly install TTS package
24
+ RUN pip install TTS
25
+
26
+ # Download necessary models (adjust paths if needed)
27
+ RUN tts --model_name "tts_models/multilingual/multi-dataset/your_tts" --out_path "/app/tts_model"
28
+ RUN tts --model_name "vocoder_models/multilingual/multi-dataset/your_multilingual_vocoder" --out_path "/app/vocoder_model"
29
+
30
+ # Create necessary directories
31
+ RUN mkdir -p /app/pretrained_models
32
+
33
+ # Copy any other necessary files
34
+ COPY scripts /app/scripts
35
+ COPY app.py /app/
36
+
37
+ # Make the run script executable
38
+ RUN chmod +x /app/scripts/run.sh
39
+
40
+ # Expose the application port (if applicable)
41
+ EXPOSE 7860
42
+
43
+ # Command to run the application
44
+ CMD ["bash", "/app/scripts/run.sh"]