MuseV / Dockerfile
jmanhype
Fix diffusers installation by installing from PyPI first
f66f834
FROM anchorxia/musev:latest
#MAINTAINER η»΄ζŠ€θ€…δΏ‘ζ―
LABEL MAINTAINER="anchorxia, zhanchao"
LABEL Email="anchorxia@tencent.com, zhanchao019@foxmail.com"
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"]