File size: 828 Bytes
5512da3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aa8b168
5512da3
 
 
 
 
 
 
 
aa8b168
b3f8976
aa8b168
 
d9c2486
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM continuumio/miniconda3

RUN apt-get update -y 
RUN apt-get install nano unzip curl -y

# THIS IS SPECIFIC TO HUGGINFACE
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

# We set working directory to $HOME/app (<=> /home/user/app)
WORKDIR $HOME/app

# Install basic dependencies
RUN pip install boto3 pandas gunicorn mlflow streamlit scikit-learn matplotlib seaborn plotly openpyxl

COPY --chown=user . $HOME/app

COPY requirements.txt /dependencies/requirements.txt
RUN pip install -r /dependencies/requirements.txt

COPY . $HOME/app

# Exposer les ports pour Streamlit et MLflow
EXPOSE 7860 5000

# Lancer Streamlit et le serveur de suivi MLflow
CMD ["sh", "-c", "streamlit run app.py --server.port 7860 --server.address 0.0.0.0 & mlflow server --host 0.0.0.0 --port 5000"]