zhongkaifu commited on
Commit
c0d8d2b
1 Parent(s): f25cb0b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +50 -0
Dockerfile ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:3.9
5
+
6
+ WORKDIR /code
7
+
8
+ COPY ./requirements.txt /code/requirements.txt
9
+
10
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
+
12
+ RUN wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
13
+ RUN dpkg -i packages-microsoft-prod.deb
14
+ RUN rm packages-microsoft-prod.deb
15
+
16
+ RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh
17
+
18
+ RUN apt-get update
19
+ RUN apt-get install -y dotnet-sdk-7.0
20
+ RUN apt-get install -y aspnetcore-runtime-7.0
21
+ RUN apt-get install -y cmake
22
+ RUN apt-get install -y git-lfs
23
+
24
+ RUN git clone https://github.com/zhongkaifu/Seq2SeqSharp.git
25
+ WORKDIR /code/Seq2SeqSharp
26
+ RUN dotnet build Seq2SeqSharp.sln --configuration Release
27
+
28
+ WORKDIR /code/Seq2SeqSharp/ExternalProjects
29
+ RUN unzip SentencePiece.zip
30
+ WORKDIR /code/Seq2SeqSharp/ExternalProjects/SentencePiece
31
+ RUN mkdir build
32
+ WORKDIR /code/Seq2SeqSharp/ExternalProjects/SentencePiece/build
33
+ RUN cmake ..
34
+ RUN make -j $(nproc)
35
+ RUN make install
36
+ RUN ldconfig -v
37
+
38
+ WORKDIR /code
39
+
40
+ RUN mkdir -p /code/bin
41
+ RUN chmod 777 /code/bin
42
+ WORKDIR /code/bin
43
+
44
+ RUN cp -r /code/Seq2SeqSharp/Tools/SeqWebApps/bin/Release/net7.0/* .
45
+ RUN wget https://github.com/zhongkaifu/Models/releases/download/MT_KORJPN_CHS/mt_cjk_chs.model
46
+ RUN wget https://huggingface.co/zhongkaifu/mt_jpnkor_chs/resolve/main/cjkSpm.model
47
+ RUN rm appsettings.json
48
+ RUN wget https://huggingface.co/zhongkaifu/mt_jpnkor_chs/resolve/main/appsettings.json
49
+
50
+ CMD ["dotnet","/code/bin/SeqWebApps.dll"]