18 lines
449 B
Docker
18 lines
449 B
Docker
FROM ubuntu:18.04
|
|
|
|
WORKDIR app
|
|
|
|
COPY data data
|
|
COPY model-pl2en model
|
|
COPY translate.py .
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y python3-pip python3-dev \
|
|
&& cd /usr/local/bin \
|
|
&& ln -s /usr/bin/python3 python \
|
|
&& pip3 install --upgrade pip
|
|
|
|
RUN pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
|
|
RUN pip3 install protobuf==3.17.3 transformers nltk sentencepiece
|
|
RUN python3 translate.py
|