forked from leaf-ai/studio-go-runner
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile_developer
78 lines (62 loc) · 2.63 KB
/
Dockerfile_developer
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Copyright 2018-2021 (c) Cognizant Digital Business, Evolutionary AI. All rights reserved. Issued under the Apache 2.0 License.
#
FROM leafai/studio-go-runner-dev-base:0.0.9
MAINTAINER [email protected]
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV CUDA_PACKAGE_VERSION 11-2-2
ENV CUDA_FILESYS_VERSION 11.2.2
ENV NVIDIA_VERSION 465
ENV USER {{.duat.userName}}
ENV USER_ID {{.duat.userID}}
ENV USER_GROUP_ID {{.duat.userGroupID}}
ENV RUNNER_BUILD_LOG {{ env "RUNNER_BUILD_LOG" | default "build.log" }}
RUN groupadd -f -g ${USER_GROUP_ID} $USER} && \
useradd -g ${USER_GROUP_ID} -u ${USER_ID} -ms /bin/bash ${USER}
USER ${USER}
WORKDIR /home/${USER}
ENV GOPATH=/project
ENV PATH=$GOPATH/bin:$PATH
ENV PATH=$PATH:/home/${USER}/.local/bin:/home/${USER}/go/bin:/home/${USER}/.pyenv/bin
ENV GOROOT=/home/${USER}/go
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia:/usr/lib/nvidia-${NVIDIA_VERSION}
RUN \
curl https://pyenv.run | /bin/bash && \
echo "eval \"\$(pyenv init --path)\"" >> $HOME/.bashrc && \
echo "eval \"\$(pyenv init -)\"" >> $HOME/.bashrc && \
echo "eval \"\$(pyenv virtualenv-init -)\"" >> $HOME/.bashrc && \
eval "$(pyenv init --path)" && \
eval "$(pyenv init -)" && \
eval "$(pyenv virtualenv-init -)" && \
pyenv install --list | grep " 3\.[89]" && \
pyenv install 3.8.10 && \
pyenv install 3.9.5 && \
pyenv global 3.8.10
RUN \
eval "$(pyenv init --path)" && \
eval "$(pyenv init -)" && \
eval "$(pyenv virtualenv-init -)" && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3 get-pip.py pip==20.1 setuptools==44.0.0 wheel==0.35.1 && \
pip3 install pyopenssl cryptography --upgrade
ENV GO_VERSION 1.16.6
RUN \
cd /home/${USER} && \
mkdir -p /home/${USER}/go && \
wget -q -O /tmp/go.tgz https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz && \
tar xzf /tmp/go.tgz && \
rm /tmp/go.tgz
RUN \
mkdir -p /home/${USER}/.local/bin && \
wget -q -O /home/${USER}/.local/bin/minio https://dl.minio.io/server/minio/release/linux-amd64/minio && \
chmod +x /home/${USER}/.local/bin/minio
VOLUME /project
WORKDIR /project/src/github.com/leaf-ai/studio-go-runner
# delete the following once initial test is running
#
ENV AMQP_URL "amqp://guest:guest@${RABBITMQ_SERVICE_SERVICE_HOST}:${RABBITMQ_SERVICE_SERVICE_PORT}/%2f?connection_attempts=2&retry_delay=.5&socket_timeout=5"
CMD /bin/bash -c 'source ./base-build.sh'
# Done last to prevent lots of disruption when bumping versions
LABEL vendor="Cognizant, AI&A" \
dev.cognizant-ai.module.version={{.duat.version}} \
dev.cognizant-ai.module.name={{.duat.module}}