Djohell commited on
Commit
eb2f052
·
verified ·
1 Parent(s): d6ca44f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -18
Dockerfile CHANGED
@@ -2,25 +2,24 @@ FROM continuumio/miniconda3
2
 
3
  WORKDIR /home/app
4
 
5
- RUN apt-get update
6
- RUN apt-get install nano unzip
7
- RUN apt install curl -y
 
 
8
 
9
- RUN curl -fsSL https://get.deta.dev/cli.sh | sh
 
 
 
 
10
 
11
- RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
12
- RUN unzip awscliv2.zip
13
- RUN ./aws/install
14
 
15
- COPY requirements.txt /dependencies/requirements.txt
16
- RUN pip install -r /dependencies/requirements.txt
17
 
18
- ENV AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
19
- ENV AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
20
- ENV BACKEND_STORE_URI=$BACKEND_STORE_URI
21
- ENV ARTIFACT_STORE_URI=$ARTIFACT_STORE_URI
22
-
23
- CMD mlflow server -p $PORT \
24
- --host 0.0.0.0 \
25
- --backend-store-uri $BACKEND_STORE_URI \
26
- --default-artifact-root $ARTIFACT_STORE_URI
 
2
 
3
  WORKDIR /home/app
4
 
5
+ # Installation optimisée
6
+ RUN apt-get update && apt-get install -y \
7
+ unzip \
8
+ curl \
9
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
10
 
11
+ # AWS CLI
12
+ RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
13
+ && unzip awscliv2.zip \
14
+ && ./aws/install \
15
+ && rm -rf awscliv2.zip ./aws
16
 
17
+ # Dépendances Python
18
+ COPY requirements.txt .
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
 
21
+ # Port fixe pour Hugging Face
22
+ EXPOSE 7860
23
 
24
+ # Commande de lancement robuste
25
+ CMD ["mlflow", "server", "--host", "0.0.0.0", "--port", "7860"]