-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.custom_model_worker
42 lines (34 loc) · 1.77 KB
/
Dockerfile.custom_model_worker
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM coreoasis/model_worker:1.9.0
#DOTNET SETUP
#DEPENDENCIES
RUN apt-get update \
&& apt-get install -y wget libc6-dev libgdiplus libx11-dev \
&& rm -rf /var/lib/apt/lists/*
RUN wget -P /tmp/ https://download.visualstudio.microsoft.com/download/pr/8db2b522-7fa2-4903-97ec-d6d04d297a01/f467006b9098c2de256e40d2e2f36fea/dotnet-sdk-3.1.301-linux-x64.tar.gz
#COPY ./dotnet-sdk-3.1.301-linux-x64.tar.gz /tmp/dotnet-sdk-3.1.301-linux-x64.tar.gz
RUN mkdir /usr/share/dotnet
RUN tar -zxf /tmp/dotnet-sdk-3.1.301-linux-x64.tar.gz -C /usr/share/dotnet/
RUN echo "export PATH=$PATH:/usr/share/dotnet/" >> ~/.bashrc
RUN echo "export DOTNET_ROOT=/usr/share/dotnet/" >> ~/.bashrc
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
RUN dotnet --info
RUN python3 --version
RUN pip3 install --upgrade pip==20.0.2
RUN rm /tmp/dotnet-sdk-3.1.301-linux-x64.tar.gz
#ERN FILES
#COPY ./ERN_Files_LAC.tar.gz /tmp/ERN_Files_LAC.tar.gz
RUN wget -P /tmp/ https://serv.ern.com.mx/download/oasis/ERN_Files_LAC.tar.gz
RUN tar -zxf /tmp/ERN_Files_LAC.tar.gz -C /usr/local/bin/
RUN rm /tmp/ERN_Files_LAC.tar.gz
COPY ./requirements.txt /tmp/
COPY ./oasislmf/oasislmf-1.9.0-py3-none-manylinux1_x86_64.whl /tmp/
RUN pip3 uninstall -y oasislmf
RUN pip3 install -r /tmp/requirements.txt
RUN pip3 install /tmp/oasislmf-1.9.0-py3-none-manylinux1_x86_64.whl
COPY ./src /home/worker/src
COPY ./meta-data /home/worker/meta-data
COPY ./oasislmf_deploy.json /home/worker/oasislmf.json
COPY ./setup.py /home/worker/
RUN pip3 install -e /home/worker/
RUN sed -i 's/OASISLMF_CONFIG = \/var\/oasis\/oasislmf.json/OASISLMF_CONFIG = \/home\/worker\/oasislmf.json/g' conf.ini
RUN sed -i 's/MODEL_SETTINGS_FILE = \/var\/oasis\/meta-data\/model_settings.json/MODEL_SETTINGS_FILE = \/home\/worker\/meta-data\/model_settings.json/g' conf.ini