This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
194 changed files
with
281,373 additions
and
57,135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,20 +4,28 @@ MAINTAINER [email protected] | |
#ENV http_proxy proxy:port | ||
#ENV https_proxy proxy:port | ||
|
||
RUN rpm -iUvh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-10.noarch.rpm | ||
|
||
RUN yum upgrade -y | ||
|
||
RUN yum install -y \ | ||
RUN rpm -iUvh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm && \ | ||
yum upgrade -y && \ | ||
yum install -y \ | ||
bzip2 \ | ||
numactl \ | ||
redhat-rpm-config \ | ||
tar \ | ||
findutils \ | ||
make \ | ||
gcc-c++ \ | ||
cmake \ | ||
git \ | ||
vim \ | ||
wget \ | ||
ssh \ | ||
openssh.x86_64 \ | ||
openssh-server.x86_64 \ | ||
openssh-clients.x86_64 \ | ||
initscripts \ | ||
net-tools \ | ||
ufw \ | ||
iptables \ | ||
atlas-devel \ | ||
boost-devel \ | ||
gflags-devel \ | ||
|
@@ -36,24 +44,36 @@ RUN yum install -y \ | |
python-pip \ | ||
python-scipy \ | ||
gcc-gfortran \ | ||
libjpeg-turbo-devel | ||
libjpeg-turbo-devel && \ | ||
yum clean all | ||
|
||
RUN yum clean all | ||
ENV CAFFE_ROOT=/opt/caffe | ||
WORKDIR $CAFFE_ROOT | ||
# Install conda and Intel Caffe conda package | ||
WORKDIR /root/ | ||
RUN wget -c https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh && \ | ||
bash Miniconda2-latest-Linux-x86_64.sh -b && \ | ||
./miniconda2/bin/conda config --add channels intel && \ | ||
./miniconda2/bin/conda install -c intel caffe && \ | ||
rm -rf /root/miniconda2/pkgs/* && \ | ||
rm ~/Miniconda2-latest-Linux-x86_64.sh -f && \ | ||
echo "export PATH=/root/miniconda2/bin:$PATH" >> /root/.bashrc | ||
WORKDIR /root/miniconda2/caffe | ||
|
||
# FIXME: clone a specific git tag and use ARG instead of ENV once DockerHub supports this. | ||
ENV CLONE_TAG=master | ||
# If you want to deploy container in HOST network mode, Install SSH service and config it to Non-standard Port. Or you needn’t below rows. | ||
RUN mkdir /var/run/sshd && \ | ||
echo "root:intelcaffe@123" | chpasswd | ||
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/;s/#Port 22/Port 10086/' /etc/ssh/sshd_config | ||
|
||
RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/intel/caffe.git . && \ | ||
for req in $(cat python/requirements.txt) pydot; do pip --no-cache-dir install $req; done && \ | ||
mkdir build && cd build && \ | ||
cmake -DCPU_ONLY=1 -DCMAKE_BUILD_TYPE=Release .. && \ | ||
make all -j"$(nproc)" | ||
# SSH login fix. Otherwise user is kicked off after login | ||
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd | ||
|
||
ENV PYCAFFE_ROOT $CAFFE_ROOT/python | ||
ENV PYTHONPATH $PYCAFFE_ROOT:$PYTHONPATH | ||
ENV PATH $CAFFE_ROOT/build/tools:$PYCAFFE_ROOT:$PATH | ||
RUN echo "$CAFFE_ROOT/build/lib" >> /etc/ld.so.conf.d/caffe.conf && ldconfig | ||
ENV NOTVISIBLE "in users profile" | ||
RUN echo "export VISIBLE=now" >> /etc/profile | ||
|
||
WORKDIR /workspace | ||
EXPOSE 10086 | ||
RUN ssh-keygen -t rsa -A && \ | ||
mkdir ~/.ssh && \ | ||
touch ~/.ssh/config && \ | ||
echo "Host *" > ~/.ssh/config && \ | ||
echo "Port 10086" >> ~/.ssh/config && \ | ||
echo "StrictHostKeyChecking no" >> ~/.ssh/config | ||
CMD ["/usr/sbin/sshd", "-D"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,9 @@ MAINTAINER [email protected] | |
#ENV http_proxy proxy:port | ||
#ENV https_proxy proxy:port | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
cpio \ | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
cpio \ | ||
build-essential \ | ||
cmake \ | ||
git \ | ||
|
@@ -38,31 +39,20 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |
python-scipy && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV CAFFE_ROOT=/opt/caffe | ||
WORKDIR $CAFFE_ROOT | ||
# Install conda and Intel Caffe conda package | ||
WORKDIR /root/ | ||
RUN wget -c https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh && \ | ||
bash Miniconda2-latest-Linux-x86_64.sh -b && \ | ||
./miniconda2/bin/conda config --add channels intel && \ | ||
./miniconda2/bin/conda install -c intel caffe && \ | ||
rm -rf /root/miniconda2/pkgs/* && \ | ||
rm ~/Miniconda2-latest-Linux-x86_64.sh -f && \ | ||
echo "export PATH=/root/miniconda2/bin:$PATH" >> /root/.bashrc | ||
WORKDIR /root/miniconda2/caffe | ||
|
||
# FIXME: clone a specific git tag and use ARG instead of ENV once DockerHub supports this. | ||
ENV CLONE_TAG=master | ||
|
||
RUN pip install --upgrade pip | ||
|
||
RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/intel/caffe.git . && \ | ||
for req in $(cat python/requirements.txt) pydot; do pip install $req; done && \ | ||
mkdir build && cd build && \ | ||
cmake -DCPU_ONLY=1 -DUSE_MLSL=1 -DCMAKE_BUILD_TYPE=Release .. && \ | ||
make all -j"$(nproc)" | ||
|
||
ENV PYCAFFE_ROOT $CAFFE_ROOT/python | ||
ENV PYTHONPATH $PYCAFFE_ROOT:$PYTHONPATH | ||
ENV PATH $CAFFE_ROOT/build/tools:$PYCAFFE_ROOT:$PATH | ||
RUN echo "$CAFFE_ROOT/build/lib" >> /etc/ld.so.conf.d/caffe.conf && ldconfig | ||
|
||
WORKDIR /opt/caffe | ||
|
||
RUN mkdir /var/run/sshd | ||
RUN echo 'root:123456' | chpasswd | ||
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | ||
RUN sed -i 's/Port 22/Port 10010/' /etc/ssh/sshd_config | ||
RUN mkdir /var/run/sshd && \ | ||
echo 'root:intelcaffe@123' | chpasswd | ||
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/;s/Port 22/Port 10010/' /etc/ssh/sshd_config | ||
|
||
# SSH login fix. Otherwise user is kicked off after login | ||
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd | ||
|
@@ -71,5 +61,10 @@ ENV NOTVISIBLE "in users profile" | |
RUN echo "export VISIBLE=now" >> /etc/profile | ||
|
||
EXPOSE 10010 | ||
|
||
RUN ssh-keygen -t rsa -A && \ | ||
mkdir ~/.ssh && \ | ||
touch ~/.ssh/config && \ | ||
echo "Host *" > ~/.ssh/config && \ | ||
echo "Port 10010" >> ~/.ssh/config && \ | ||
echo "StrictHostKeyChecking no" >> ~/.ssh/config | ||
CMD ["/usr/sbin/sshd", "-D"] |
Oops, something went wrong.