optigesr commited on
Commit
5a25d2e
·
1 Parent(s): 656a113

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +48 -0
Dockerfile ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Use an official Python runtime as a parent image
3
+ FROM nvidia/cuda:11.7.0-base-ubuntu20.04
4
+
5
+ # Set the working directory
6
+ WORKDIR /app
7
+
8
+ # Install git, wget, build-essential
9
+ RUN apt-get update && apt-get install -y git wget build-essential
10
+
11
+ # Install Miniconda
12
+ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
13
+ bash Miniconda3-latest-Linux-x86_64.sh -b -p /miniconda && \
14
+ rm Miniconda3-latest-Linux-x86_64.sh
15
+ ENV PATH="/miniconda/bin:${PATH}"
16
+
17
+ # Clone the repository
18
+ RUN git clone https://github.com/Pranjalya/tts-tortoise-gradio.git /app/tortoise
19
+
20
+ # Change the working directory to the tortoise-tts-fast directory
21
+ WORKDIR /app/tortoise
22
+
23
+ # Create the Conda environment
24
+ RUN conda create -n ttts-fast python=3.8 && \
25
+ echo "source activate ttts-fast" > ~/.bashrc
26
+ ENV PATH /miniconda/envs/ttts-fast/bin:$PATH
27
+
28
+ # Set the shell for the following commands to use the Conda environment "ttts-fast"
29
+ SHELL ["conda", "run", "-n", "ttts-fast", "/bin/bash", "-c"]
30
+
31
+ # Install the necessary packages
32
+ RUN conda install -y pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 -c pytorch -c nvidia && \
33
+ conda install -c anaconda gdbm && \
34
+ pip install -r requirements.txt
35
+ python3 setup.py install
36
+
37
+ # Make port 8501 available to the world outside this container
38
+ EXPOSE 8501
39
+
40
+ # Define environment variable
41
+ ENV NAME tortoise
42
+
43
+ # List the contents of the /app directory
44
+ RUN ls -al /app
45
+
46
+ # Run the application
47
+ CMD ["gradio app.py"]
48
+