ZeroTwo3 commited on
Commit
f2d2903
1 Parent(s): 4910058

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +69 -0
Dockerfile ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a base image with Debian and necessary dependencies
2
+ FROM debian:buster-slim
3
+
4
+ # Set non-interactive mode during apt-get installs
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Step 1: Update and upgrade the system
8
+ RUN apt-get update && apt-get upgrade -y
9
+
10
+ # Step 2: Install dependencies
11
+ RUN apt-get install -y --no-install-recommends \
12
+ git \
13
+ git-lfs \
14
+ wget \
15
+ curl \
16
+ build-essential \
17
+ libssl-dev \
18
+ zlib1g-dev \
19
+ libbz2-dev \
20
+ libreadline-dev \
21
+ libsqlite3-dev \
22
+ libncursesw5-dev \
23
+ xz-utils \
24
+ tk-dev \
25
+ libxml2-dev \
26
+ libxmlsec1-dev \
27
+ libffi-dev \
28
+ liblzma-dev \
29
+ ffmpeg \
30
+ libsndfile-dev \
31
+ && apt-get clean \
32
+ && rm -rf /var/lib/apt/lists/*
33
+
34
+ # Step 3: Clone the repo
35
+ RUN git -c http.sslVerify=false clone https://github.com/Audio-AGI/WavJourney.git
36
+
37
+ # Step 4: Install miniconda
38
+ RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
39
+ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
40
+ && bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/miniconda3 \
41
+ && rm -f Miniconda3-latest-Linux-x86_64.sh
42
+
43
+ # Step 5: Add conda binary to PATH variable
44
+ ENV HOME=/home/user \
45
+ PATH=/opt/miniconda3/bin:/home/user/.local/bin:$PATH \
46
+ CONDA_PREFIX=/opt/miniconda3/envs
47
+
48
+ # Step 6: Setup conda envs
49
+ WORKDIR $HOME/app
50
+ COPY --chown=user . $HOME/app
51
+
52
+ # Step 7: Conda envs setup
53
+ RUN bash ./scripts/EnvsSetup.sh
54
+
55
+ # Step 8: Pre-download all models
56
+ RUN conda run --live-stream -n WavJourney python scripts/download_models.py
57
+ RUN mkdir $HOME/app/services_logs
58
+
59
+ # Step 9: Env settings
60
+ ENV PYTHONPATH=${HOME}/app \
61
+ PYTHONUNBUFFERED=1 \
62
+ GRADIO_ALLOW_FLAGGING=never \
63
+ GRADIO_NUM_PORTS=1 \
64
+ GRADIO_SERVER_NAME=0.0.0.0 \
65
+ GRADIO_THEME=huggingface \
66
+ SYSTEM=spaces
67
+
68
+ # Step 10: Start the service entrypoint
69
+ ENTRYPOINT bash /home/user/app/scripts/start_services.sh