jmanhype commited on
Commit
0deea65
Β·
1 Parent(s): f0aa467

Fix entrypoint script creation in Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -9
Dockerfile CHANGED
@@ -26,12 +26,8 @@ RUN echo "docker start"\
26
  && pwd
27
 
28
  RUN git clone -b hg_space --recursive https://github.com/TMElyralab/MuseV.git
29
- # RUN mkdir ./MuseV/checkpoints \
30
- # && ls -l ./MuseV
31
  RUN chmod -R 777 /home/user/app/MuseV
32
 
33
- # RUN git clone -b main https://huggingface.co/TMElyralab/MuseV /home/user/app/MuseV/checkpoints
34
-
35
  RUN . /opt/conda/etc/profile.d/conda.sh \
36
  && echo "source activate musev" >> ~/.bashrc \
37
  && conda activate musev \
@@ -41,12 +37,25 @@ RUN echo "export PYTHONPATH=\${PYTHONPATH}:/home/user/app/MuseV:/home/user/app/M
41
 
42
  WORKDIR /home/user/app/MuseV/scripts/gradio/
43
 
44
- # Add entrypoint script
45
- COPY --chown=user entrypoint.sh ./entrypoint.sh
46
- RUN chmod +x ./entrypoint.sh
47
- RUN ls -l ./
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  EXPOSE 7860
50
 
51
- # CMD ["/bin/bash", "-c", "python app.py"]
52
  CMD ["./entrypoint.sh"]
 
26
  && pwd
27
 
28
  RUN git clone -b hg_space --recursive https://github.com/TMElyralab/MuseV.git
 
 
29
  RUN chmod -R 777 /home/user/app/MuseV
30
 
 
 
31
  RUN . /opt/conda/etc/profile.d/conda.sh \
32
  && echo "source activate musev" >> ~/.bashrc \
33
  && conda activate musev \
 
37
 
38
  WORKDIR /home/user/app/MuseV/scripts/gradio/
39
 
40
+ # Create entrypoint script
41
+ RUN echo '#!/bin/bash\n\
42
+ echo "=== Starting MuseV Gradio App ==="\n\
43
+ whoami\n\
44
+ \n\
45
+ # Activate conda environment\n\
46
+ source /opt/conda/etc/profile.d/conda.sh\n\
47
+ conda activate musev\n\
48
+ \n\
49
+ # Print environment info\n\
50
+ echo "Python: $(which python)"\n\
51
+ echo "Python version: $(python --version)"\n\
52
+ echo "PYTHONPATH: $PYTHONPATH"\n\
53
+ \n\
54
+ # Run the app\n\
55
+ cd /home/user/app/MuseV/scripts/gradio\n\
56
+ python app_gradio_space.py' > ./entrypoint.sh \
57
+ && chmod +x ./entrypoint.sh
58
 
59
  EXPOSE 7860
60
 
 
61
  CMD ["./entrypoint.sh"]