File size: 1,499 Bytes
3f5a7e6
98bcc2f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3f5a7e6
98bcc2f
 
3f5a7e6
98bcc2f
 
3f5a7e6
 
98bcc2f
3f5a7e6
 
 
 
98bcc2f
 
3f5a7e6
98bcc2f
 
 
 
 
3f5a7e6
98bcc2f
 
 
 
 
3f5a7e6
 
 
 
98bcc2f
 
3f5a7e6
98bcc2f
 
3f5a7e6
98bcc2f
 
3f5a7e6
98bcc2f
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Use the official Python 3.10 slim image as the base
FROM python:3.10-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
    git \
    git-lfs \
    ffmpeg \
    libsm6 \
    libxext6 \
    cmake \
    rsync \
    libgl1-mesa-glx \
    && rm -rf /var/lib/apt/lists/* \
    && git lfs install

# Set the working directory in the container
WORKDIR /app

# Copy your application code into the container at /app
COPY . /app

# Install gradio==4.36.1
RUN pip install --no-cache-dir gradio==4.36.1

# Install gradio_client==1.0.1
RUN pip install --no-cache-dir gradio_client==1.0.1

# Install transformers==4.41.2
RUN pip install --no-cache-dir transformers==4.41.2

# Install TTS==0.22.0
RUN pip install --no-cache-dir TTS==0.22.0

# Install numpy==1.22.0 required by TTS
RUN pip install --no-cache-dir numpy==1.22.0

# Uninstall numpy==1.22.0 to resolve conflicts
RUN pip uninstall -y numpy

# Install numpy==1.23.5 required by other packages
RUN pip install --no-cache-dir numpy==1.23.5

# Install PyTorch
RUN pip install --no-cache-dir torch

# Upgrade transformers to the latest version (if needed)
RUN pip install --no-cache-dir --upgrade transformers

# Uninstall pydantic if installed by other packages
RUN pip uninstall -y pydantic

# Install specific versions of fastapi and pydantic
RUN pip install --no-cache-dir fastapi==0.111.0 pydantic==2.7.4

# Expose port 7860 for Gradio (if necessary)
EXPOSE 7860

# Command to run your application
CMD ["python", "app.py"]