forked from hashtopolis/agent-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
54 lines (43 loc) · 1.95 KB
/
Copy pathDockerfile
File metadata and controls
54 lines (43 loc) · 1.95 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM ubuntu:20.04
ARG DEV_CONTAINER_USER_CMD_PRE
ARG DEV_CONTAINER_USER_CMD_POST
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
ENV NODE_OPTIONS='--use-openssl-ca'
# Check for and run optional user-supplied command to enable (advanced) customizations of the dev container
RUN if [ -n "${DEV_CONTAINER_USER_CMD_PRE}" ]; then echo "${DEV_CONTAINER_USER_CMD_PRE}" | sh ; fi
RUN groupadd vscode && useradd -rm -d /app -s /bin/bash -g vscode -u 1001 vscode
RUN apt-get update \
&& apt-get install python3 python3-pip -y \
&& apt-get install git -y
# Install Intel OpenCL Runtime
RUN cd /tmp \
&& apt install wget lsb-core libnuma-dev pciutils clinfo -y \
&& wget http://registrationcenter-download.intel.com/akdlm/irc_nas/vcp/15532/l_opencl_p_18.1.0.015.tgz \
&& tar xzvf l_opencl_p_18.1.0.015.tgz \
&& cd l_opencl_p_18.1.0.015 \
&& echo "ACCEPT_EULA=accept" > silent.cfg \
&& echo "PSET_INSTALL_DIR=/opt/intel" >> silent.cfg \
&& echo "CONTINUE_WITH_OPTIONAL_ERROR=yes" >> silent.cfg \
&& echo "CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes" >> silent.cfg \
&& echo "COMPONENTS=DEFAULTS" >> silent.cfg \
&& echo "PSET_MODE=install" >> silent.cfg \
&& ./install.sh -s silent.cfg
# Clean
RUN apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/l_opencl_p_18.1.0.015*
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
# Configuring app / python requirements
WORKDIR /app
USER vscode
COPY requirements.txt /app/src/
COPY requirements-tests.txt /app/src/
RUN /usr/bin/pip3 install -r src/requirements.txt
RUN /usr/bin/pip3 install -r src/requirements-tests.txt
# Check for and run optional user-supplied command to enable (advanced) customizations of the dev container
RUN if [ -n "${DEV_CONTAINER_USER_CMD_POST}" ]; then echo "${DEV_CONTAINER_USER_CMD_POST}" | sh ; fi
# Preventing container from exiting
CMD tail -f /dev/null