Skip to content

Commit bcfcff7

Browse files
authored
Merge branch 'main' into csl/sphinx_gallery_ex
2 parents f89c82f + f66b5b2 commit bcfcff7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2367
-1034
lines changed

.ci/docker/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ ENV DEBIAN_FRONTEND noninteractive
77
COPY ./common/install_base.sh install_base.sh
88
RUN bash ./install_base.sh && rm install_base.sh
99

10+
# Setup user
11+
# TODO: figure out how to remove this part
12+
COPY ./common/install_user.sh install_user.sh
13+
RUN bash ./install_user.sh && rm install_user.sh
14+
1015
COPY ./common/install_docs_reqs.sh install_docs_reqs.sh
1116
RUN bash ./install_docs_reqs.sh && rm install_docs_reqs.sh
1217

@@ -20,4 +25,5 @@ COPY ./common/install_conda.sh install_conda.sh
2025
COPY ./common/common_utils.sh common_utils.sh
2126
RUN bash ./install_conda.sh && rm install_conda.sh common_utils.sh /opt/conda/requirements.txt
2227

28+
USER ci-user
2329
CMD ["bash"]

.ci/docker/common/common_utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ as_ci_user() {
77
# NB: Pass on PATH and LD_LIBRARY_PATH to sudo invocation
88
# 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 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 -u ci-user 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() {

.ci/docker/common/install_conda.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
1212
CONDA_FILE="Miniconda3-latest-Linux-x86_64.sh"
1313

1414
mkdir -p /opt/conda
15+
chown ci-user:ci-user /opt/conda
1516

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

.ci/docker/common/install_user.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-style license found in the
6+
# LICENSE file in the root directory of this source tree.
7+
8+
# Copied from https://github.com/pytorch/executorch/blob/6e431355a554e5f84c3a05dfa2b981ead90c2b48/.ci/docker/common/install_user.sh#L1
9+
10+
set -ex
11+
12+
# Same as ec2-user
13+
echo "ci-user:x:1000:1000::/var/lib/ci-user:" >> /etc/passwd
14+
echo "ci-user:x:1000:" >> /etc/group
15+
# Needed on Focal or newer
16+
echo "ci-user:*:19110:0:99999:7:::" >> /etc/shadow
17+
18+
# Create $HOME
19+
mkdir -p /var/lib/ci-user
20+
chown ci-user:ci-user /var/lib/ci-user
21+
22+
# Allow sudo
23+
echo 'ci-user ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/ci-user
24+
25+
# Test that sudo works
26+
sudo -u ci-user sudo -v

.ci/docker/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
sphinx==5.0.0
55
sphinx-gallery==0.11.1
66
sphinx_design
7-
nbsphinx
87
docutils==0.16
98
sphinx-copybutton
109
pypandoc==1.12
@@ -14,7 +13,7 @@ tqdm==4.66.1
1413
numpy==1.24.4
1514
matplotlib
1615
librosa
17-
torch
16+
torch==2.3
1817
torchvision
1918
torchtext
2019
torchdata
@@ -39,6 +38,8 @@ torchmultimodal-nightly # needs to be updated to stable as soon as it's avaialab
3938
onnx
4039
onnxscript
4140
onnxruntime
41+
evaluate
42+
accelerate>=0.20.1
4243

4344
importlib-metadata==6.8.0
4445

.circleci/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)