File size: 1,516 Bytes
06e9d12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ecd4f25
 
 
b33e736
 
 
 
ecd4f25
b33e736
06e9d12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM anchorxia/musev:latest

#MAINTAINER η»΄ζŠ€θ€…δΏ‘ζ―
LABEL MAINTAINER="anchorxia, zhanchao"
LABEL Email="[email protected], [email protected]"
LABEL Description="musev gradio image, from docker pull anchorxia/musev:latest"

SHELL ["/bin/bash", "--login", "-c"]

# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user

# Switch to the "user" user
USER user

# Set home to the user's home directory
ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

# Set the working directory to the user's home directory
WORKDIR $HOME/app

RUN echo "docker start"\ 
  && whoami \
  && which python \
  && pwd

# Clone repository and configure git locally
RUN git clone -b hg_space --recursive https://github.com/TMElyralab/MuseV.git \
    && cd MuseV \
    && mkdir -p .git \
    && git config --local user.email "[email protected]" \
    && git config --local user.name "jmanhype" \
    && chmod -R 777 .git

# Set permissions
RUN chmod -R 777 /home/user/app/MuseV

RUN . /opt/conda/etc/profile.d/conda.sh  \
    && echo "source activate musev" >> ~/.bashrc \
    && conda activate musev \
    && conda env list

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

WORKDIR /home/user/app/MuseV/scripts/gradio/

# Add entrypoint script
COPY --chown=user entrypoint.sh ./entrypoint.sh
RUN chmod +x ./entrypoint.sh

EXPOSE 7860

CMD ["./entrypoint.sh"]