Spaces:
Running
Running
Update Dockerfile
Browse files- 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
|
| 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
|
|
|