FROM bitnami/pytorch | |
RUN mkdir --mode 777 /app/my_streamlit_app | |
WORKDIR /app/my_stramlit_app | |
COPY ./requirements.txt /app/my_streamlit_app/requirements.txt | |
RUN pip install --no-cache-dir -r /app/my_streamlit_app/requirements.txt | |
RUN mkdir --mode 777 "/app/my_streamlit_app/.cache/" | |
RUN mkdir --mode 777 "/app/my_streamlit_app/.cache/huggingface/" | |
ENV HUGGINGFACE_HUB_CACHE="/app/my_streamlit_app/.cache/huggingface" | |
RUN mkdir --mode 777 "/app/my_streamlit_app/.cache/transformers/" | |
ENV TRANSFORMERS_CACHE="/app/my_streamlit_app/.cache/transformers" | |
ENV TOKENIZERS_PARALLELISM=false | |
COPY . /app/my_streamlit_app/ | |
COPY ./.streamlit /app/my_streamlit_app/.streamlit/ | |
CMD ["streamlit", "run", "--server.port", "7860", "--browser.gatherUsageStats", "false", "--theme.base", "dark", "/app/my_streamlit_app/app.py"] | |