Skip to content

Commit

Permalink
SynapseAi 1.5.0 release
Browse files Browse the repository at this point in the history
 * Update dockerfiles with 1.5.0 content
 * Update installation scripts for 1.5.0 install versions
 * Add check_habana_framework_env.py script
  • Loading branch information
omrialmog committed Jun 16, 2022
1 parent d6670d9 commit 881f282
Show file tree
Hide file tree
Showing 24 changed files with 348 additions and 439 deletions.
13 changes: 6 additions & 7 deletions dockerfiles/Dockerfile_amzn2_base_installer
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ RUN wget -nv "https://efa-installer.amazonaws.com/aws-efa-installer-${EFA_INSTAL
cd /tmp/aws-efa-installer && ./efa_installer.sh -y --skip-kmod --skip-limit-conf --no-verify && \
cd - && rm -rf /tmp/*

ENV LD_LIBRARY_PATH=/opt/amazon/openmpi/lib:/opt/amazon/efa/lib:$LD_LIBRARY_PATH
ENV PATH=/opt/amazon/openmpi/bin:/opt/amazon/efa/bin:$PATH
ENV OPAL_PREFIX=/opt/amazon/openmpi
ENV MPI_ROOT=/opt/amazon/openmpi
ENV MPICC=/opt/amazon/openmpi/bin/mpicc
ENV LD_LIBRARY_PATH=${MPI_ROOT}/lib:/opt/amazon/efa/lib:$LD_LIBRARY_PATH
ENV PATH=${MPI_ROOT}/bin:/opt/amazon/efa/bin:$PATH
ENV OPAL_PREFIX=${MPI_ROOT}
ENV MPICC=${MPI_ROOT}/bin/mpicc
ENV FI_EFA_ENABLE_SHM_TRANSFER=0

RUN echo "[habanalabs]" > /etc/yum.repos.d/habanalabs.repo && \
Expand All @@ -60,8 +60,6 @@ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2
RUN rm -f /etc/yum.repos.d/habanalabs.repo && \
yum clean all && rm -rf /var/cache/yum

RUN python3 -m pip install hpu_media_loader=="${VERSION}"."${REVISION}" --no-cache-dir \
--extra-index-url https://"${ARTIFACTORY_URL}"/artifactory/api/pypi/gaudi-python/simple
# SSH configuration necessary to support mpi-operator v2
RUN mkdir -p /var/run/sshd && \
sed -i 's/[ #]\(.*StrictHostKeyChecking \).*/ \1no/g' /etc/ssh/ssh_config && \
Expand All @@ -71,10 +69,11 @@ RUN mkdir -p /var/run/sshd && \
# There is no need to store pip installation files inside docker image
ENV PIP_NO_CACHE_DIR=off

RUN python3 -m pip install hpu_media_loader=="${VERSION}"."${REVISION}"

RUN echo "export LANG=en_US.UTF-8" >> /root/.bashrc
RUN export LANG=en_US.UTF-8
ENV GC_KERNEL_PATH=/usr/lib/habanalabs/libtpc_kernels.so
ENV HABANA_LOGS=/var/log/habana_logs/
ENV SCAL_CFG_FILE_PATH=/opt/habanalabs/etc/scal/default.json
ENV HABANA_SCAL_BIN_PATH=/opt/habanalabs/engines_fw
ENV HABANA_PLUGINS_LIB_PATH=/opt/habanalabs/habana_plugins
6 changes: 5 additions & 1 deletion dockerfiles/Dockerfile_amzn2_pytorch_installer
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ARG REVISION
ARG ARTIFACTORY_URL

ENV LANG=en_US.UTF-8
ENV PYTHONPATH=/root:/usr/lib/habanalabs/

RUN yum install -y \
unzip \
Expand All @@ -27,7 +28,8 @@ RUN yum install -y \
zlib-devel \
lapack-devel \
blas-devel \
numactl && \
numactl \
gperftools && \
yum clean all

RUN amazon-linux-extras install epel -y
Expand Down Expand Up @@ -57,4 +59,6 @@ RUN wget "https://${ARTIFACTORY_URL}"/artifactory/gaudi-pt-modules/"${VERSION}"/
rm -rf /root/habanalabs/pytorch_temp/ && \
rm -rf pytorch_modules-v"${PT_VERSION}"_"${VERSION}"_"${REVISION}".tgz

ENV LD_PRELOAD=/lib64/libtcmalloc.so

RUN rm -rf /tmp/*
6 changes: 3 additions & 3 deletions dockerfiles/Dockerfile_amzn2_tensorflow_installer
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/pr
unzip protoc-3.6.1-linux-x86_64.zip -d /usr/local/protoc && \
rm -rf protoc-3.6.1-linux-x86_64.zip

COPY requirements-no-deps-tensorflow-cpu-"$TF_VERSION".txt requirements-no-deps-tensorflow-cpu-"$TF_VERSION".txt
COPY requirements-tensorflow-cpu-"$TF_VERSION".txt requirements-tensorflow-cpu-"$TF_VERSION".txt

RUN python3 -m pip install pip==21.0.1 && \
pip3 install setuptools==60.5.0 && \
rm -rf get-pip.py && \
pip3 install tensorflow-cpu==${TF_VERSION} \
tensorflow-model-optimization==0.7.0 && \
pip3 install --no-deps -r requirements-no-deps-tensorflow-cpu-"$TF_VERSION".txt && \
rm requirements-no-deps-tensorflow-cpu-"$TF_VERSION".txt
pip3 install -r requirements-tensorflow-cpu-"$TF_VERSION".txt && \
rm requirements-tensorflow-cpu-"$TF_VERSION".txt

# For AML/CentOS/RHEL OS'es TFIO_DATAPATH have to be specified to import tensorflow_io lib correctly
ENV TFIO_DATAPATH=/usr/local/lib64/python3.8/site-packages/
Expand Down
57 changes: 0 additions & 57 deletions dockerfiles/Dockerfile_centos8.3_base_installer

This file was deleted.

74 changes: 0 additions & 74 deletions dockerfiles/Dockerfile_centos8.3_pytorch_installer

This file was deleted.

70 changes: 0 additions & 70 deletions dockerfiles/Dockerfile_centos8.3_tensorflow_installer

This file was deleted.

13 changes: 6 additions & 7 deletions dockerfiles/Dockerfile_rhel8.3_base_installer
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ RUN wget -nv "https://efa-installer.amazonaws.com/aws-efa-installer-${EFA_INSTAL
./efa_installer.sh -y --skip-kmod --skip-limit-conf --no-verify && \
cd - && rm -rf /tmp/*

ENV LD_LIBRARY_PATH=/opt/amazon/openmpi/lib:/opt/amazon/efa/lib:$LD_LIBRARY_PATH
ENV PATH=/opt/amazon/openmpi/bin:/opt/amazon/efa/bin:$PATH
ENV OPAL_PREFIX=/opt/amazon/openmpi
ENV MPI_ROOT=/opt/amazon/openmpi
ENV MPICC=/opt/amazon/openmpi/bin/mpicc
ENV LD_LIBRARY_PATH=${MPI_ROOT}/lib:/opt/amazon/efa/lib:$LD_LIBRARY_PATH
ENV PATH=${MPI_ROOT}/bin:/opt/amazon/efa/bin:$PATH
ENV OPAL_PREFIX=${MPI_ROOT}
ENV MPICC=${MPI_ROOT}/bin/mpicc
ENV FI_EFA_ENABLE_SHM_TRANSFER=0

RUN echo "[habanalabs]" > /etc/yum.repos.d/habanalabs.repo && \
Expand All @@ -78,8 +78,8 @@ RUN dnf install -y habanalabs-thunk-"$VERSION"-"$REVISION".el8 \
RUN rm -f /etc/yum.repos.d/habanalabs.repo && rm -rf /tmp/* && \
dnf clean all && rm -rf /var/cache/yum

RUN python3 -m pip install hpu_media_loader=="${VERSION}"."${REVISION}" --no-cache-dir \
--extra-index-url https://"${ARTIFACTORY_URL}"/artifactory/api/pypi/gaudi-python/simple
RUN python3 -m pip install hpu_media_loader=="${VERSION}"."${REVISION}" --no-cache-dir

# SSH configuration necessary to support mpi-operator v2
RUN mkdir -p /var/run/sshd && \
sed -i 's/[ #]\(.*StrictHostKeyChecking \).*/ \1no/g' /etc/ssh/ssh_config && \
Expand All @@ -90,6 +90,5 @@ RUN echo "export LANG=en_US.UTF-8" >> /root/.bashrc
RUN export LANG=en_US.UTF-8
ENV GC_KERNEL_PATH=/usr/lib/habanalabs/libtpc_kernels.so
ENV HABANA_LOGS=/var/log/habana_logs/
ENV SCAL_CFG_FILE_PATH=/opt/habanalabs/etc/scal/default.json
ENV HABANA_SCAL_BIN_PATH=/opt/habanalabs/engines_fw
ENV HABANA_PLUGINS_LIB_PATH=/opt/habanalabs/habana_plugins
6 changes: 5 additions & 1 deletion dockerfiles/Dockerfile_rhel8.3_pytorch_installer
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ARG HABANA_PIP_VERSION="21.0.1"

ENV SETUPTOOLS_VERSION=41.0.0
ENV LANG=en_US.UTF-8
ENV PYTHONPATH=/root:/usr/lib/habanalabs/

RUN dnf install -y \
unzip \
Expand All @@ -31,7 +32,8 @@ RUN dnf install -y \
cpupowerutils \
lapack-devel \
blas-devel \
numactl && \
numactl \
gperftools.x86_64 && \
dnf clean all && rm -rf /var/cache/yum

RUN python3 -m pip install pip=="${HABANA_PIP_VERSION}" && \
Expand All @@ -55,4 +57,6 @@ RUN wget "https://${ARTIFACTORY_URL}"/artifactory/gaudi-pt-modules/"${VERSION}"/
rm -rf /root/habanalabs/pytorch_temp/ && \
rm -rf pytorch_modules-v"${PT_VERSION}"_"${VERSION}"_"${REVISION}".tgz

ENV LD_PRELOAD=/lib64/libtcmalloc.so

RUN rm -rf /tmp/*
7 changes: 3 additions & 4 deletions dockerfiles/Dockerfile_rhel8.3_tensorflow_installer
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ RUN dnf install -y libarchive unzip \
protobuf-devel && \
dnf clean all && rm -rf /var/cache/dnf

COPY requirements-no-deps-tensorflow-cpu-"$TF_VERSION".txt requirements-no-deps-tensorflow-cpu-"$TF_VERSION".txt
COPY requirements-tensorflow-cpu-"$TF_VERSION".txt requirements-tensorflow-cpu-"$TF_VERSION".txt

RUN python3 -m pip install pip=="${HABANA_PIP_VERSION}" && \
pip3 install setuptools==60.5.0

RUN pip3 install tensorflow-cpu==${TF_VERSION} \
tensorflow-model-optimization==0.7.0 && \
pip3 install --no-deps -r requirements-no-deps-tensorflow-cpu-"$TF_VERSION".txt && \
rm requirements-no-deps-tensorflow-cpu-"$TF_VERSION".txt
pip3 install -r requirements-tensorflow-cpu-"$TF_VERSION".txt && \
rm requirements-tensorflow-cpu-"$TF_VERSION".txt

# For AML/CentOS/RHEL OS'es TFIO_DATAPATH have to be specified to import tensorflow_io lib correctly
ENV TFIO_DATAPATH=/usr/local/lib64/python3.8/site-packages/
Expand All @@ -45,7 +45,6 @@ RUN ln -s /etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt
RUN python3 -m pip install habana-tensorflow=="${VERSION}"."${REVISION}" && \
python3 -m pip install habana-horovod=="${VERSION}"."${REVISION}"


RUN /usr/bin/ssh-keygen -A && \
echo "source /etc/profile.d/habanalabs.sh" >> ~/.bashrc && \
echo "/usr/sbin/sshd -p 3022" >> ~/.bashrc && \
Expand Down
Loading

0 comments on commit 881f282

Please sign in to comment.