diff --git a/Dockerfile b/Dockerfile index fdf2191..3c5e38c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ FROM python:3.10 -EXPOSE 80 WORKDIR /app COPY . . # Cron @@ -9,4 +8,4 @@ RUN crontab /app/crontab RUN crontab -l # Python RUN pip install -r requirements.txt -ENTRYPOINT ["cron","-f"] +ENTRYPOINT ["./entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh index 91dd2c3..4daac9b 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,14 +1,6 @@ #!/bin/bash -# Charger le fichier cron -crontab /app/crontab - -# Démarrer le service cron en arrière-plan -#service cron start - - -pip install --upgrade pip -pip install scikit-learn -echo "Start" -cron && tail -f /app/cron.log -echo "End" +echo "[INFO] STARTING AI MODEL TRAINING SERVER" +echo "[INFO] LAUNCH CRON IN BACKGROUND" +service cron start +service cron status