CazimirRoman commited on
Commit
42ef6c5
·
1 Parent(s): 1515b6d

try new docker config

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -29
Dockerfile CHANGED
@@ -1,37 +1,46 @@
1
- FROM python:3.10
2
 
3
- WORKDIR /code
4
 
5
- COPY ./requirements.txt /code/requirements.txt
6
 
7
- RUN apt-get update && xargs -r -a /packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
8
- RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
9
 
10
- # we are using open AI here. no need to download model
11
- # RUN python3 -c 'from transformers import pipeline, AutoTokenizer, AutoModelForSeq2SeqLM;model=AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-cnn");model.save_pretrained("models");tokenizer=AutoTokenizer.from_pretrained("facebook/bart-large-cnn");tokenizer.save_pretrained("models")'
12
 
13
- # Set up a new user named "user" with user ID 1000
14
- RUN useradd -m -u 1000 user
15
- # Switch to the "user" user
16
- USER user
17
- # Set home to the user's home directory
18
- ENV HOME=/home/user
19
- ENV PATH=/home/user/.local/bin:$PATH
20
 
21
- # Set the working directory to the user's home directory
22
- WORKDIR $HOME
23
- RUN mkdir app
24
- WORKDIR $HOME/app
25
- COPY . $HOME/app
26
 
27
- # Copy the current directory contents into the container at $HOME/app setting the owner to the user
28
- # COPY --chown=user . $HOME/app
29
-
30
- # COPY ./app /code/app
31
-
 
 
 
 
 
 
 
 
 
 
 
32
  EXPOSE 8501
33
- CMD streamlit run app.py \
34
- --server.headless true \
35
- --server.enableCORS false \
36
- --server.enableXsrfProtection false \
37
- --server.fileWatcherType none
 
1
+ # FROM python:3.10
2
 
3
+ # WORKDIR /code
4
 
5
+ # COPY ./requirements.txt /code/requirements.txt
6
 
7
+ # RUN apt-get update && xargs -r -a /packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
8
+ # RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
9
 
10
+ # # we are using open AI here. no need to download model
11
+ # # RUN python3 -c 'from transformers import pipeline, AutoTokenizer, AutoModelForSeq2SeqLM;model=AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-cnn");model.save_pretrained("models");tokenizer=AutoTokenizer.from_pretrained("facebook/bart-large-cnn");tokenizer.save_pretrained("models")'
12
 
13
+ # # Set up a new user named "user" with user ID 1000
14
+ # RUN useradd -m -u 1000 user
15
+ # # Switch to the "user" user
16
+ # USER user
17
+ # # Set home to the user's home directory
18
+ # ENV HOME=/home/user
19
+ # ENV PATH=/home/user/.local/bin:$PATH
20
 
21
+ # # Set the working directory to the user's home directory
22
+ # WORKDIR $HOME
23
+ # RUN mkdir app
24
+ # WORKDIR $HOME/app
25
+ # COPY . $HOME/app
26
 
27
+ # # Copy the current directory contents into the container at $HOME/app setting the owner to the user
28
+ # # COPY --chown=user . $HOME/app
29
+
30
+ # # COPY ./app /code/app
31
+
32
+ # EXPOSE 8501
33
+ # CMD streamlit run app.py \
34
+ # --server.headless true \
35
+ # --server.enableCORS false \
36
+ # --server.enableXsrfProtection false \
37
+ # --server.fileWatcherType none
38
+
39
+ FROM python:3.9-slim
40
+ WORKDIR /app
41
+ COPY requirements.txt ./requirements.txt
42
+ RUN pip install -r requirements.txt
43
  EXPOSE 8501
44
+ COPY . /app
45
+ ENTRYPOINT ["streamlit", "run"]
46
+ CMD ["app.py", "--server.port", "7860"]