santit96 commited on
Commit
98cd6e7
·
1 Parent(s): 18464de

Dockerize app

Browse files
Files changed (2) hide show
  1. .dockerignore +2 -0
  2. Dockerfile +22 -0
.dockerignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *.csv
2
+ data/
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM --platform=linux/amd64 tensorflow/tensorflow:2.12.0
2
+
3
+ WORKDIR /bert_sentiment_classifier
4
+
5
+ ARG UID=1000
6
+ ARG GID=1000
7
+
8
+ RUN groupadd -g "${GID}" python \
9
+ && useradd --create-home --no-log-init -u "${UID}" -g "${GID}" python \
10
+ && chown python:python -R /bert_sentiment_classifier
11
+
12
+ USER python
13
+
14
+ COPY --chown=python:python ./requirements.txt ./
15
+
16
+ RUN pip install --no-cache-dir --user -r requirements.txt
17
+
18
+ COPY --chown=python:python . .
19
+
20
+ EXPOSE 8501
21
+
22
+ CMD ["streamlit", "run", "sentiment_analysis.py", , "--server.port=8501", "--server.address=0.0.0.0"]