This repository has been archived by the owner on Jul 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile.imaging_powerai_160
70 lines (59 loc) · 2.05 KB
/
Dockerfile.imaging_powerai_160
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
#FROM ibmcom/powerai:1.6.0-all-ubuntu18.04-py3-ppc64le
#
#ENV USER_NAME pwrai
#ENV CONDA_DIR /home/pwrai/anaconda3
#ENV PATH ${CONDA_DIR}/bin:${PATH}
#ENV WORK_DIR /home/${USER_NAME}/microDL
#RUN echo 1 | sudo /opt/DL/license/bin/accept-powerai-license.sh
#RUN sudo /bin/ln -sf /bin/bash /bin/sh
#RUN sudo /bin/sed -i -e "/ddl-tensorflow/a\
#\ \ \ \ scripts['tensorboard']=\'/opt/DL/tensorboard/bin/tensorboard-activate\'" /var/local/powerai/default_framework.sh
FROM ibmcom/powerai:1.6.0-all-ubuntu18.04-py3
ENV USER_NAME root
ENV CONDA_DIR /root/anaconda3
ENV PATH ${CONDA_DIR}/bin:${PATH}
ENV WORK_DIR /${USER_NAME}/microDL
#
RUN echo 1 | sudo /opt/anaconda3/bin/accept-powerai-license.sh
RUN sudo /bin/ln -sf /bin/bash /bin/sh
#RUN sudo /bin/sed -i -e "/ddl-tensorflow/a\
#\ \ \ \ scripts['tensorboard']=\'/opt/DL/tensorboard/bin/tensorboard-activate\'" /var/local/powerai/default_framework.sh
# Tools
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \
build-essential \
libcupti-dev \
ca-certificates \
cmake \
libfreetype6-dev \
wget \
git \
pkg-config \
tmux \
graphviz \
vim
RUN sudo wget -O ~/get-pip.py \
https://bootstrap.pypa.io/pip/3.6/get-pip.py && \
python ~/get-pip.py
# keras
RUN pip install --upgrade --no-cache-dir keras==2.1.6 && \
# Jupyter
pip install --upgrade --no-cache-dir jupyter
# Cleanup
RUN sudo apt-get clean && \
sudo apt-get autoremove && \
sudo rm -rf /var/lib/apt/lists/*
# Install pip packages from requirements text file
ADD requirements_docker.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
#SHELL ["/bin/bash", "--login", "-
ADD conda_environment_docker.yml /tmp/conda.yml
RUN conda update conda
#RUN conda env create --file=/tmp/conda.yml && \
RUN conda env update --name base --prune --file=/tmp/conda.yml
#conda init bash && \
#conda activate micro_dl\
WORKDIR ${WORK_DIR}
ENV PYTHONPATH ${WORK_DIR}
#RUN sudo chown ${USER_NAME} ${WORK_DIR}
#RUN sudo chgrp ${USER_NAME} ${WORK_DIR}
EXPOSE 8888 6006