Skip to content

Commit

Permalink
【iluvatar】fix docker bug (#320)
Browse files Browse the repository at this point in the history
* fix the error that cannot generate docker image

* fix iluvatar docker bug

* fix the spelling error

* add 'apt install -y libncursesw5'
  • Loading branch information
forestlee95 authored Nov 10, 2023
1 parent d0160fe commit 01f3f33
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
14 changes: 11 additions & 3 deletions training/iluvatar/docker_image/pytorch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

# copy /etc/apt/sources.list . or choose an available one if encountering a problem with the mirror source
# ADD sources.list /etc/apt/

RUN /bin/bash -c "source /root/.bashrc"

Expand Down Expand Up @@ -33,11 +36,14 @@ RUN apt-get install -y --fix-missing \
pbzip2 \
pv \
numactl \
ninja-build
ninja-build \
gcc-7 \
g++-7 \
libncursesw5


# Configure anaconda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh && \
RUN wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh && \
bash ./Miniconda3-py38_4.10.3-Linux-x86_64.sh -b -p /root/miniconda && \
/root/miniconda/bin/conda clean -tipsy && \
ln -s /root/miniconda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
Expand All @@ -50,6 +56,8 @@ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64

RUN /bin/bash -c "apt-get install -y linux-headers-`uname -r`"

RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 10 --slave /usr/bin/g++ g++ /usr/bin/g++-7

RUN /bin/bash -c "pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple"

ENV LD_LIBRARY_PATH="/usr/local/corex/lib:${LD_LIBRARY_PATH}"
Expand Down
7 changes: 6 additions & 1 deletion training/iluvatar/docker_image/pytorch/pytorch_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ done
search_sdk_results=`find ${SDK_DIR} -name "corex*.run"`
for installer in $search_sdk_results; do
echo "Install ${installer}"
sh "${installer}" -- --silent --driver --toolkit
sh "${installer}" -- --silent --toolkit
done

torch_packages_results=`find ${PKG_DIR} -name "torch-*.whl"`
if [ -n "$torch_packages_results" ]; then
pip3 install "$torch_packages_results"
fi

search_packages_results=`find ${PKG_DIR} -name "*.whl"`
for pkg in $search_packages_results; do
echo "Install ${pkg}"
Expand Down

0 comments on commit 01f3f33

Please sign in to comment.