File size: 1,470 Bytes
5a25d2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e5c6b0b
5a25d2e
 
 
 
 
 
 
 
 
 
 
 
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

# Use an official Python runtime as a parent image
FROM nvidia/cuda:11.7.0-base-ubuntu20.04

# Set the working directory
WORKDIR /app

# Install git, wget, build-essential
RUN apt-get update && apt-get install -y git wget build-essential

# Install Miniconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
    bash Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda && \
    rm Miniconda3-latest-Linux-x86_64.sh
ENV PATH="/miniconda/bin:${PATH}"

# Clone the repository
RUN git clone https://github.com/Pranjalya/tts-tortoise-gradio.git /app/tortoise

# Change the working directory to the tortoise-tts-fast directory
WORKDIR /app/tortoise

# Create the Conda environment
RUN conda create -n ttts-fast python=3.8 && \
    echo "source activate ttts-fast" > ~/.bashrc
ENV PATH /miniconda/envs/ttts-fast/bin:$PATH

# Set the shell for the following commands to use the Conda environment "ttts-fast"
SHELL ["conda", "run", "-n", "ttts-fast", "/bin/bash", "-c"]

# Install the necessary packages
RUN conda install -y pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 -c pytorch -c nvidia && \
    conda install -c anaconda gdbm && \
    	pip install -r requirements.txt
CMD ["python setup.py install"]
# Make port 8501 available to the world outside this container
EXPOSE 8501

# Define environment variable
ENV NAME tortoise

# List the contents of the /app directory
RUN ls -al /app

# Run the application
CMD ["gradio app.py"]