Skip to content

Commit f2d52bd

Browse files
committed
update
1 parent 02a55e0 commit f2d52bd

File tree

8 files changed

+21
-98
lines changed

8 files changed

+21
-98
lines changed

.ci/docker/Dockerfile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ ENV DEBIAN_FRONTEND noninteractive
99
COPY ./common/install_base.sh install_base.sh
1010
RUN bash ./install_base.sh && rm install_base.sh
1111

12-
# Install user
13-
COPY ./common/install_user.sh install_user.sh
14-
RUN bash ./install_user.sh && rm install_user.sh
15-
1612
COPY ./common/install_docs_reqs.sh install_docs_reqs.sh
1713
RUN bash ./install_docs_reqs.sh && rm install_docs_reqs.sh
1814

@@ -26,10 +22,4 @@ COPY ./common/install_conda.sh install_conda.sh
2622
COPY ./common/common_utils.sh common_utils.sh
2723
RUN bash ./install_conda.sh && rm install_conda.sh common_utils.sh /opt/conda/requirements.txt
2824

29-
# Install CUDNN
30-
ENV CUDNN_VERSION=8
31-
COPY ./common/install_cudnn.sh install_cudnn.sh
32-
RUN bash ./install_cudnn.sh && rm install_cudnn.sh
33-
34-
USER jenkins
3525
CMD ["bash"]

.ci/docker/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ shift
1313
export CUDA_VERSION="12.1.1"
1414
export UBUNTU_VERSION="20.04"
1515

16-
export BASE_IMAGE="nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}"
16+
export BASE_IMAGE="ubuntu:${UBUNTU_VERSION}"
1717
echo "Building ${IMAGE_NAME} Docker image"
1818

1919
docker build \

.ci/docker/common/common_utils.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
#!/bin/bash
22

33
# Work around bug where devtoolset replaces sudo and breaks it.
4-
as_jenkins() {
4+
as_ci_user() {
55
# NB: unsetting the environment variables works around a conda bug
66
# https://github.com/conda/conda/issues/6576
77
# NB: Pass on PATH and LD_LIBRARY_PATH to sudo invocation
8-
# NB: This must be run from a directory that jenkins has access to,
8+
# NB: This must be run from a directory that the user has access to,
99
# works around https://github.com/conda/conda-package-handling/pull/34
10-
sudo -E -H -u jenkins env -u SUDO_UID -u SUDO_GID -u SUDO_COMMAND -u SUDO_USER env "PATH=$PATH" "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" $*
10+
sudo -E -H env -u SUDO_UID -u SUDO_GID -u SUDO_COMMAND -u SUDO_USER env "PATH=$PATH" "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" $*
1111
}
1212

1313
conda_install() {
1414
# Ensure that the install command don't upgrade/downgrade Python
1515
# This should be called as
1616
# conda_install pkg1 pkg2 ... [-c channel]
17-
as_jenkins conda install -q -n py_$ANACONDA_PYTHON_VERSION -y python="$ANACONDA_PYTHON_VERSION" $*
17+
as_ci_user conda install -q -n py_$ANACONDA_PYTHON_VERSION -y python="$ANACONDA_PYTHON_VERSION" $*
1818
}
1919

2020
conda_run() {
21-
as_jenkins conda run -n py_$ANACONDA_PYTHON_VERSION --no-capture-output $*
21+
as_ci_user conda run -n py_$ANACONDA_PYTHON_VERSION --no-capture-output $*
2222
}
2323

2424
pip_install() {
25-
as_jenkins conda run -n py_$ANACONDA_PYTHON_VERSION pip install --progress-bar off $*
25+
as_ci_user conda run -n py_$ANACONDA_PYTHON_VERSION pip install --progress-bar off $*
2626
}

.ci/docker/common/install_conda.sh

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
1212
CONDA_FILE="Miniconda3-latest-Linux-x86_64.sh"
1313

1414
mkdir -p /opt/conda
15-
chown jenkins:jenkins /opt/conda
1615

1716
source "$(dirname "${BASH_SOURCE[0]}")/common_utils.sh"
1817

1918
pushd /tmp
2019
wget -q "${BASE_URL}/${CONDA_FILE}"
2120
# NB: Manually invoke bash per https://github.com/conda/conda/issues/10431
22-
as_jenkins bash "${CONDA_FILE}" -b -f -p "/opt/conda"
21+
as_ci_user bash "${CONDA_FILE}" -b -f -p "/opt/conda"
2322
popd
2423

2524
# NB: Don't do this, rely on the rpath to get it right
@@ -28,46 +27,28 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
2827
sed -e 's|PATH="\(.*\)"|PATH="/opt/conda/bin:\1"|g' -i /etc/environment
2928
export PATH="/opt/conda/bin:$PATH"
3029

31-
# Ensure we run conda in a directory that jenkins has write access to
30+
# Ensure we run conda in a directory that the user has write access to
3231
pushd /opt/conda
3332

3433
# Prevent conda from updating to 4.14.0, which causes docker build failures
3534
# See https://hud.pytorch.org/pytorch/pytorch/commit/754d7f05b6841e555cea5a4b2c505dd9e0baec1d
3635
# Uncomment the below when resolved to track the latest conda update
37-
# as_jenkins conda update -y -n base conda
36+
# as_ci_user conda update -y -n base conda
3837

3938
# Install correct Python version
40-
as_jenkins conda create -n py_$ANACONDA_PYTHON_VERSION -y python="$ANACONDA_PYTHON_VERSION"
41-
42-
# Install PyTorch conda deps, as per https://github.com/pytorch/pytorch README
43-
CONDA_COMMON_DEPS="astunparse pyyaml mkl=2021.4.0 mkl-include=2021.4.0 setuptools"
44-
45-
# Install llvm-8 as it is required to compile llvmlite-0.30.0 from source
46-
# and libpython-static for torch deploy
47-
conda_install llvmdev=8.0.0 "libpython-static=${ANACONDA_PYTHON_VERSION}"
39+
as_ci_user conda create -n py_$ANACONDA_PYTHON_VERSION -y python="$ANACONDA_PYTHON_VERSION"
4840

4941
# Use conda cmake in some cases. Conda cmake will be newer than our supported
5042
# min version (3.5 for xenial and 3.10 for bionic), so we only do it in those
5143
# following builds that we know should use conda. Specifically, Ubuntu bionic
5244
# and focal cannot find conda mkl with stock cmake, so we need a cmake from conda
5345
conda_install cmake
5446

55-
conda_install "magma-cuda$(TMP=${CUDA_VERSION/./};echo ${TMP%.*[0-9]})" -c pytorch
56-
57-
# Install some other packages, including those needed for Python test reporting
47+
# Install pip packages
5848
pip_install -r /opt/conda/requirements.txt
5949

6050
apt-get update
6151
apt-get -y install expect-dev
6252

63-
# HACK HACK HACK
64-
# gcc-9 for ubuntu-18.04 from http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu
65-
# Pulls llibstdc++6 13.1.0-8ubuntu1~18.04 which is too new for conda
66-
# So remove libstdc++6.so.3.29 installed by https://anaconda.org/anaconda/libstdcxx-ng/files?version=11.2.0
67-
# Same is true for gcc-12 from Ubuntu-22.04
68-
if grep -e [12][82].04.[623] /etc/issue >/dev/null; then
69-
rm /opt/conda/envs/py_$ANACONDA_PYTHON_VERSION/lib/libstdc++.so.6
70-
fi
71-
7253
popd
7354
fi

.ci/docker/common/install_cudnn.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

.ci/docker/common/install_user.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

.ci/docker/requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
sphinx==5.0.0
55
sphinx-gallery==0.11.1
66
sphinx_design
7+
nbsphinx
78
docutils==0.16
89
sphinx-copybutton
10+
pypandoc==1.12
11+
pandocfilters
12+
markdown
913
tqdm==4.66.1
1014
numpy==1.24.4
1115
matplotlib
@@ -28,7 +32,7 @@ torchx
2832
torchrl==0.3.0
2933
tensordict==0.3.0
3034
ax-platform
31-
nbformat>=4.2.0
35+
nbformat>==5.9.2
3236
datasets
3337
transformers
3438
torchmultimodal-nightly # needs to be updated to stable as soon as it's avaialable

.github/workflows/build-tutorials.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,10 @@ jobs:
8686
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
8787
--tty \
8888
--detach \
89-
--user jenkins \
9089
--shm-size=2gb \
9190
--name="${container_name}" \
92-
-v "${GITHUB_WORKSPACE}:/var/lib/jenkins/workspace" \
93-
-w /var/lib/jenkins/workspace \
91+
-v "${GITHUB_WORKSPACE}:/var/lib/workspace" \
92+
-w /var/lib/workspace \
9493
"${DOCKER_IMAGE}"
9594
)
9695
@@ -157,10 +156,9 @@ jobs:
157156
--env-file="/tmp/github_env_${GITHUB_RUN_ID}" \
158157
--tty \
159158
--detach \
160-
--user jenkins \
161159
--name="${container_name}" \
162-
-v "${GITHUB_WORKSPACE}:/var/lib/jenkins/workspace" \
163-
-w /var/lib/jenkins/workspace \
160+
-v "${GITHUB_WORKSPACE}:/var/lib/workspace" \
161+
-w /var/lib/workspace \
164162
"${DOCKER_IMAGE}"
165163
)
166164

0 commit comments

Comments
 (0)