tbboukhari commited on
Commit
3f5a7e6
1 Parent(s): 98bcc2f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -13
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # Use the official Python 3.10 image as the base
2
  FROM python:3.10-slim
3
 
4
  # Install system dependencies
@@ -14,41 +14,46 @@ RUN apt-get update && apt-get install -y \
14
  && rm -rf /var/lib/apt/lists/* \
15
  && git lfs install
16
 
17
- # Set the working directory
18
  WORKDIR /app
19
 
20
- # Copy your application code to the container
21
  COPY . /app
22
 
23
- # Install initial Python dependencies
24
- # Install gradio and gradio_client
25
- RUN pip install --no-cache-dir gradio==4.36.1 gradio_client==1.0.1
26
 
27
- # Install transformers
 
 
 
28
  RUN pip install --no-cache-dir transformers==4.41.2
29
 
30
- # Install TTS
31
  RUN pip install --no-cache-dir TTS==0.22.0
32
 
33
  # Install numpy==1.22.0 required by TTS
34
  RUN pip install --no-cache-dir numpy==1.22.0
35
 
36
- # Uninstall numpy==1.22.0
37
  RUN pip uninstall -y numpy
38
 
39
  # Install numpy==1.23.5 required by other packages
40
  RUN pip install --no-cache-dir numpy==1.23.5
41
 
42
- # Upgrade transformers to the latest version
 
 
 
43
  RUN pip install --no-cache-dir --upgrade transformers
44
 
45
- # Uninstall pydantic (if installed)
46
  RUN pip uninstall -y pydantic
47
 
48
- # Install fastapi and pydantic with specific versions
49
  RUN pip install --no-cache-dir fastapi==0.111.0 pydantic==2.7.4
50
 
51
- # Expose the port your app will run on (if necessary)
52
  EXPOSE 7860
53
 
54
  # Command to run your application
 
1
+ # Use the official Python 3.10 slim image as the base
2
  FROM python:3.10-slim
3
 
4
  # Install system dependencies
 
14
  && rm -rf /var/lib/apt/lists/* \
15
  && git lfs install
16
 
17
+ # Set the working directory in the container
18
  WORKDIR /app
19
 
20
+ # Copy your application code into the container at /app
21
  COPY . /app
22
 
23
+ # Install gradio==4.36.1
24
+ RUN pip install --no-cache-dir gradio==4.36.1
 
25
 
26
+ # Install gradio_client==1.0.1
27
+ RUN pip install --no-cache-dir gradio_client==1.0.1
28
+
29
+ # Install transformers==4.41.2
30
  RUN pip install --no-cache-dir transformers==4.41.2
31
 
32
+ # Install TTS==0.22.0
33
  RUN pip install --no-cache-dir TTS==0.22.0
34
 
35
  # Install numpy==1.22.0 required by TTS
36
  RUN pip install --no-cache-dir numpy==1.22.0
37
 
38
+ # Uninstall numpy==1.22.0 to resolve conflicts
39
  RUN pip uninstall -y numpy
40
 
41
  # Install numpy==1.23.5 required by other packages
42
  RUN pip install --no-cache-dir numpy==1.23.5
43
 
44
+ # Install PyTorch
45
+ RUN pip install --no-cache-dir torch
46
+
47
+ # Upgrade transformers to the latest version (if needed)
48
  RUN pip install --no-cache-dir --upgrade transformers
49
 
50
+ # Uninstall pydantic if installed by other packages
51
  RUN pip uninstall -y pydantic
52
 
53
+ # Install specific versions of fastapi and pydantic
54
  RUN pip install --no-cache-dir fastapi==0.111.0 pydantic==2.7.4
55
 
56
+ # Expose port 7860 for Gradio (if necessary)
57
  EXPOSE 7860
58
 
59
  # Command to run your application