File size: 912 Bytes
6bfd42f
 
 
 
 
 
 
 
 
 
d45ee3e
6bfd42f
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.9

RUN --mount=target=/root/packages.txt,source=packages.txt 	apt-get update &&  xargs -r -a /root/packages.txt apt-get install -y

RUN pip install --no-cache-dir pip==22.3.1 &&     pip install --no-cache-dir         datasets         "huggingface-hub>=0.12.1" "protobuf<4" "click<8.1"

WORKDIR /home/user/app

RUN apt-get install -y 	git 	git-lfs 	ffmpeg 	libsm6 	libxext6 	cmake 	libgl1-mesa-glx && git lfs install

RUN pip install --no-cache-dir Cython "gradio==3.37.0" "torch==1.10.1"  jieba subword-nmt sacremoses transformers

RUN git clone --recurse-submodules https://github.com/thu-coai/DA-Transformer.git && cd DA-Transformer && pip install -e . && cd dag_search && python3 setup.py build_ext --inplace && pip install -e . && cd ../..

RUN mkdir -p /home/user && chmod 777 /home/user

USER user

ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

COPY . .

CMD ["python3", "app.py"]