-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.model_execution_worker
More file actions
executable file
·38 lines (30 loc) · 1.11 KB
/
Dockerfile.model_execution_worker
File metadata and controls
executable file
·38 lines (30 loc) · 1.11 KB
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
FROM coreoasis/oasis_base:latest
RUN adduser --shell /bin/bash --disabled-password --gecos "" worker
WORKDIR /home/worker
# Install requirments
COPY ./requirements.in /tmp/
RUN pip install pip-tools
RUN pip-compile --output-file /tmp/requirements.txt /tmp/requirements.in
RUN pip install -r /tmp/requirements.txt
# Copy Static data
COPY ./data/static /var/oasis/model_data/OasisIM/1
COPY ./data/static /var/oasis/model_data/OasisIM/2
# Copy startup script + server config
COPY ./src/startup_worker.sh ./startup.sh
COPY ./conf.ini ./
COPY ./src/__init__.py ./src/
COPY ./src/common ./src/common/
COPY ./src/conf ./src/conf/
COPY ./src/model_execution_worker/ ./src/model_execution_worker/
COPY ./src/utils/ ./src/utils/
COPY ./tests /home/worker/tests
RUN mkdir -p /var/oasis/working && \
mkdir -p /var/log/oasis && \
touch /var/log/oasis/worker.log && \
chmod 777 /var/log/oasis/worker.log
RUN chmod -R 777 /home/worker /var/log/oasis /var/oasis && \
chown -R worker /home/worker && \
chown -R worker /var/oasis && \
chown -R worker /var/log && \
chown -R worker /var/oasis/working
ENTRYPOINT ./startup.sh