FROM bitnami/pytorch | |
RUN mkdir --mode 600 /my_streamlit_app | |
WORKDIR /my_stramlit_app | |
COPY ./requirements.txt /my_streamlit_app/requirements.txt | |
RUN pip install --no-cache-dir -r /my_streamlit_app/requirements.txt | |
RUN mkdir --mode 600 "/my_streamlit_app/.cache/" | |
RUN mkdir --mode 600 "/my_streamlit_app/.cache/huggingface/" | |
ENV HUGGINGFACE_HUB_CACHE="/my_streamlit_app/.cache/huggingface" | |
RUN mkdir --mode 600 "/my_streamlit_app/.cache/transformers/" | |
ENV TRANSFORMERS_CACHE="/my_streamlit_app/.cache/transformers" | |
COPY . /my_streamlit_app | |
CMD ["streamlit", "run", "/app/app.py"] | |