Elyon7 commited on
Commit
e4fb2d4
·
verified ·
1 Parent(s): c5deede

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -4
Dockerfile CHANGED
@@ -21,11 +21,15 @@ RUN apt-get update && apt-get install -y \
21
  EXPOSE 7860
22
  ENV MPLCONFIGDIR=/tmp/matplotlib
23
 
24
-
25
- CMD git clone https://$GITHUB_TOKEN@github.com/Elyon7/Cosmo-Edu_Lab.git . && \
 
 
 
 
 
26
  git lfs pull && \
27
  mkdir -p App/student_submissions && \
28
  chmod 777 App/student_submissions && \
29
  pip install --no-cache-dir -r requirements.txt && \
30
- cd App && \
31
- python main.py
 
21
  EXPOSE 7860
22
  ENV MPLCONFIGDIR=/tmp/matplotlib
23
 
24
+ CMD if [ -d ".git" ]; then \
25
+ echo "Aggiorno il codice esistente..." && \
26
+ git pull origin main; \
27
+ else \
28
+ echo "Clono il repository..." && \
29
+ git clone https://$GITHUB_TOKEN@github.com/Elyon7/Cosmo-Edu_Lab.git .; \
30
+ fi && \
31
  git lfs pull && \
32
  mkdir -p App/student_submissions && \
33
  chmod 777 App/student_submissions && \
34
  pip install --no-cache-dir -r requirements.txt && \
35
+ python -u App/main.py