mateo-demo / Dockerfile
BramVanroy's picture
Update Dockerfile
797f976 verified
raw
history blame
1.32 kB
FROM ubuntu:latest
LABEL authors="Bram Vanroy"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update \
&& apt-get -y install build-essential curl git software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa \
&& apt-get -y update \
&& apt-get -y install python3.10 python3.10-dev python3-pip python3.10-distutils \
&& ln -s /usr/bin/python3.10 /usr/bin/python \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV HOME /home/user
ENV PATH $HOME/.local/bin:$PATH
ENV HF_HUB_ENABLE_HF_TRANSFER=1
WORKDIR $HOME
RUN git clone https://github.com/BramVanroy/mateo-demo.git
WORKDIR $HOME/mateo-demo
RUN python -m pip install --no-cache-dir --upgrade pip && python -m pip install --no-cache-dir --upgrade .
# Preload models
RUN huggingface-cli download facebook/nllb-200-distilled-600M pytorch_model.bin sentencepiece.bpe.model tokenizer.json
RUN huggingface-cli download Unbabel/wmt22-comet-da checkpoints/model.ckpt
RUN huggingface-cli download bert-base-multilingual-cased model.safetensors tokenizer.json vocab.txt
EXPOSE 7860
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
WORKDIR $HOME/mateo-demo/src/mateo_st
CMD ["streamlit", "run", "01_🎈_MATEO.py", "--server.port", "7860", "--server.enableXsrfProtection", "false", "--", "--no_cuda"]