-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dokerfile
44 lines (33 loc) · 1.11 KB
/
Dokerfile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM python:3.9
RUN pip install virtualenv
ENV VIRTUAL_ENV=/venv
RUN virtualenv venv -p python3
ENV PATH="VIRTUAL_ENV/bin:$PATH"
WORKDIR /Chatbot
COPY requirements.txt ./requirements.txt
# Installation des dépendances
RUN pip3 install -r requirements.txt
# Exposition de l'application sur le port
#ENV PORT 8501
EXPOSE 8000
# copying all files over
COPY . /Chatbot
# commande à exécuter lorsque le contenaire est lancé
#CMD streamlit run streamlit_main.py
#ENTRYPOINT [ "streamlit", "run", "streamlit_main.py" , "--server.port=8501", "--server.address=127.0.0.1" ]
ENTRYPOINT ["python3.9", "-m", "aiohttp.web" ,"-H" ,"0.0.0.0" ,"-P", "8000" ,"app:init_function"]
#ENTRYPOINT [ "streamlit", "run" ]
#CMD [ "streamlit_main.py"]
# configuration spécifiques à Streamlit
#ENV LC_ALL=C.UTF-8
#ENV LANG=C.UTF-8
#RUN mkdir -p /root/.streamlit
#RUN bash -c 'echo -e "\
#[general]\n\
#email = \"\"\n\
#" > /root/.streamlit/credentials.toml'
#RUN bash -c 'echo -e "\
#"[server]\n\
#enableCORS = True\n\
#" > /root/.streamlit/config.toml'
# Le DockerImage peut être testé avec la commande docker run -p 8501:8501 <Docker Image Name>