anchor commited on
Commit
616535f
1 Parent(s): 40ece0d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -5
Dockerfile CHANGED
@@ -7,24 +7,35 @@ LABEL Description="musev gradio image, from docker pull anchorxia/musev:latest"
7
 
8
  SHELL ["/bin/bash", "--login", "-c"]
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  RUN echo "docker start"\
11
  && whoami \
12
  && which python
13
 
14
- WORKDIR /root
15
-
16
  RUN git clone -b deploy --recursive https://github.com/TMElyralab/MuseV.git
17
  RUN mkdir ./MuseV/checkpoints \
18
  && ls -l ./MuseV
19
- RUN chmod -R 777 /root/MuseV
20
 
21
  RUN . /opt/conda/etc/profile.d/conda.sh \
22
  && conda activate musev \
23
  && conda env list
24
 
25
- RUN echo "export PYTHONPATH=\${PYTHONPATH}:/root/MuseV:/root/MuseV/MMCM:/root/MuseV/diffusers/src:/root/MuseV/controlnet_aux/src" >> ~/.bashrc
26
 
27
- WORKDIR /root/MuseV/scripts/gradio/
28
  RUN ls -l ./
29
 
30
  EXPOSE 7860
 
7
 
8
  SHELL ["/bin/bash", "--login", "-c"]
9
 
10
+ # Set up a new user named "user" with user ID 1000
11
+ RUN useradd -m -u 1000 user
12
+
13
+ # Switch to the "user" user
14
+ USER user
15
+
16
+ # Set home to the user's home directory
17
+ ENV HOME=/home/user \
18
+ PATH=/home/user/.local/bin:$PATH
19
+
20
+ # Set the working directory to the user's home directory
21
+ WORKDIR $HOME/app
22
+
23
  RUN echo "docker start"\
24
  && whoami \
25
  && which python
26
 
 
 
27
  RUN git clone -b deploy --recursive https://github.com/TMElyralab/MuseV.git
28
  RUN mkdir ./MuseV/checkpoints \
29
  && ls -l ./MuseV
30
+ RUN chmod -R 777 /home/user/app/MuseV
31
 
32
  RUN . /opt/conda/etc/profile.d/conda.sh \
33
  && conda activate musev \
34
  && conda env list
35
 
36
+ RUN echo "export PYTHONPATH=\${PYTHONPATH}:/home/user/app/MuseV:/home/user/app/MuseV/MMCM:/home/user/app/MuseV/diffusers/src:/home/user/app/MuseV/controlnet_aux/src" >> ~/.bashrc
37
 
38
+ WORKDIR /home/user/app/MuseV/scripts/gradio/
39
  RUN ls -l ./
40
 
41
  EXPOSE 7860