TeresaK commited on
Commit
1974ff2
·
verified ·
1 Parent(s): ad12a94

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+
3
+ WORKDIR /app
4
+
5
+ ENV POETRY_VERSION=1.6.1
6
+ RUN pip install "poetry==$POETRY_VERSION"
7
+
8
+ RUN poetry config virtualenvs.create false
9
+
10
+ COPY ./poetry.lock /app/poetry.lock
11
+ COPY ./pyproject.toml /app/pyproject.toml
12
+ RUN poetry install --no-dev
13
+
14
+ # User
15
+ RUN useradd -m -u 1000 user
16
+ USER user
17
+ ENV HOME /home/user
18
+ ENV PATH $HOME/.local/bin:$PATH
19
+
20
+ WORKDIR $HOME
21
+ RUN mkdir app
22
+ WORKDIR $HOME/app
23
+ COPY . $HOME/app
24
+
25
+ RUN --mount=type=secret,id=OPEN_API_KEY,mode=0444,required=true
26
+
27
+ EXPOSE 8501
28
+ CMD streamlit run src/app.py \
29
+ --server.headless true \
30
+ --server.enableCORS false \
31
+ --server.enableXsrfProtection false \
32
+ --server.fileWatcherType none