-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
66 lines (48 loc) · 1.84 KB
/
Dockerfile
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
FROM nvidia/cuda:10.1-devel-ubuntu18.04
ARG LWLL_SECRET
ARG LOGGER_REPO_DEPLOY_USER
ARG LOGGER_REPO_DEPLOY_TOKEN
RUN echo ${LWLL_SECRET}
RUN echo ${LOGGER_REPO_DEPLOY_USER}
RUN echo ${LOGGER_REPO_DEPLOY_TOKEN}
#Install other libraries from requirements.txt
RUN apt-get update
#RUN apt-cache search nvidia-driver > result.txt
#RUN sudo docker cp result.txt .
#CMD ["apt-cache", "search", "nvidia-driver"]
RUN apt-get install -y -q
RUN apt-get install -y build-essential
RUN apt-get install -y --no-install-recommends apt-utils
RUN apt-get install -y wget
RUN apt-get install -y vim
RUN apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev
RUN apt update && apt-get install -y git
RUN apt-get install dialog apt-utils -y
# --------------Upgrade to Python 3.7------------------
# Upgrade installed packages
RUN apt-get update && apt-get upgrade -y && apt-get clean
# (...)
# Python package management and basic dependencies
RUN apt-get install -y curl python3.7 python3.7-dev python3.7-distutils
# Register the version in alternatives
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
# Set python 3 as the default python
RUN update-alternatives --set python /usr/bin/python3.7
# Upgrade pip to latest version
RUN curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py --force-reinstall && \
rm get-pip.py
#-------------------------------------------------
#Copy all files in ~/taglets to /tmp/
COPY . /tmp
RUN cd /tmp && pip install .
RUN cd /tmp && ./setup.sh
RUN cd /tmp/ && git clone https://${LOGGER_REPO_DEPLOY_USER}:${LOGGER_REPO_DEPLOY_TOKEN}@gitlab.lollllz.com/brown/logger
RUN cd /tmp/logger && pip install -e .
RUN useradd --create-home tagletuser
RUN chmod -R 777 /tmp
RUN chmod -R 777 /home/tagletuser/
USER 65534:65534
ENV TORCH_HOME=/tmp
WORKDIR /tmp
CMD bash run_jpl.sh