lajota13 commited on
Commit
0fb7c30
·
verified ·
1 Parent(s): 904e442

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -0
Dockerfile ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+ LABEL python_version=python3.10
3
+
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ curl \
7
+ software-properties-common \
8
+ git \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+
12
+ # Poetry virtual environment setup
13
+ ENV POETRY_NO_INTERACTION=1
14
+ ENV POETRY_HOME /opt/env
15
+ ENV POETRY_CACHE_DIR /opt/.cache
16
+ # mandatory !!
17
+ ENV POETRY_VIRTUALENVS_IN_PROJECT=1
18
+
19
+ RUN python3 -m venv $POETRY_HOME
20
+ RUN $POETRY_HOME/bin/pip install -U pip setuptools
21
+ RUN $POETRY_HOME/bin/pip install poetry==1.7.1
22
+
23
+ ENV PATH $PATH:$POETRY_HOME/bin
24
+
25
+ COPY . /app/
26
+ WORKDIR /app
27
+
28
+ # creating the poetry virtual environment
29
+ RUN poetry lock --no-update
30
+ RUN poetry install --no-root
31
+
32
+ ENV PATH="/app/.venv/bin:$PATH"
33
+
34
+ EXPOSE $PORT
35
+
36
+ HEALTHCHECK CMD curl --fail http://localhost:$PORT/_stcore/health
37
+
38
+ ENTRYPOINT streamlit run fe.py --server.port=$PORT --server.address=0.0.0.0