File size: 2,225 Bytes
f0aa467 06e9d12 820874d f0aa467 4b7aec3 820874d 30fab3d f0aa467 d056d5c f0aa467 d056d5c 6fe313c f66f834 d056d5c d459533 f66f834 d056d5c f0aa467 d056d5c f66f834 f0aa467 0deea65 fc9f185 0deea65 fc9f185 f0aa467 fc9f185 |
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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
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 repositories
RUN git clone --recursive https://github.com/TMElyralab/MuseV.git && \
cd /home/user/app && \
git clone https://github.com/TMElyralab/MMCM.git && \
git clone https://github.com/TMElyralab/diffusers.git -b main && \
git clone https://github.com/TMElyralab/controlnet_aux.git -b tme
RUN chmod -R 777 /home/user/app/MuseV
# Set up conda environment and install dependencies
RUN . /opt/conda/etc/profile.d/conda.sh && \
conda activate musev && \
pip install --no-cache-dir \
"huggingface_hub>=0.19.3" \
"transformers>=4.30.2" \
"accelerate>=0.20.3" \
"gradio>=4.12.0" \
"diffusers==0.21.4" \
spaces && \
cd /home/user/app/MMCM && pip install -e . && \
cd /home/user/app/diffusers && \
pip install --no-deps -e . && \
cd /home/user/app/controlnet_aux && pip install -e .
RUN echo "source activate musev" >> ~/.bashrc
# Set up Python path
ENV PYTHONPATH=/home/user/app/MuseV:/home/user/app/MMCM:/home/user/app/diffusers/src:/home/user/app/controlnet_aux/src
WORKDIR /home/user/app/MuseV/scripts/gradio/
# Create entrypoint script
RUN printf '#!/bin/bash\n\
echo "=== Starting MuseV Gradio App ==="\n\
whoami\n\
source /opt/conda/etc/profile.d/conda.sh\n\
conda activate musev\n\
echo "Python: $(which python)"\n\
echo "Python version: $(python --version)"\n\
echo "PYTHONPATH: $PYTHONPATH"\n\
cd /home/user/app/MuseV/scripts/gradio\n\
python app_gradio_space.py' > entrypoint.sh && \
chmod +x entrypoint.sh
EXPOSE 7860
ENTRYPOINT ["/bin/bash", "/home/user/app/MuseV/scripts/gradio/entrypoint.sh"] |