tbboukhari commited on
Commit
98bcc2f
·
verified ·
1 Parent(s): 4736499

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +55 -0
Dockerfile ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python 3.10 image as the base
2
+ FROM python:3.10-slim
3
+
4
+ # Install system dependencies
5
+ RUN apt-get update && apt-get install -y \
6
+ git \
7
+ git-lfs \
8
+ ffmpeg \
9
+ libsm6 \
10
+ libxext6 \
11
+ cmake \
12
+ rsync \
13
+ libgl1-mesa-glx \
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
55
+ CMD ["python", "app.py"]