-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
27 lines (20 loc) · 958 Bytes
/
Dockerfile
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
FROM lucone83/streamlit-nginx:python3.8
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends git \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
USER streamlitapp
RUN pip3 install torch --extra-index-url https://download.pytorch.org/whl/cpu
RUN pip3 install transformers tokenizers
ENV MODEL_NAME NbAiLab/nb-gpt-j-6B
ENV DEVICE cpu
ENV HF_AUTH_TOKEN ""
ENV MAX_LENGTH 256
RUN git config --global credential.helper store
RUN mkdir /home/streamlitapp/.huggingface
# RUN echo "${HF_AUTH_TOKEN}" > /home/streamlitapp/.huggingface/token
# COPY --chown=streamlitapp requirements.txt /home/streamlitapp/requirements.txt
COPY --chown=streamlitapp app.py /home/streamlitapp/app.py
# RUN pip3 install -r /home/streamlitapp/requirements.txt
CMD ["streamlit", "run", "/home/streamlitapp/app.py", "--server.baseUrlPath=/demo/nb-gpt-j-6B", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]