Skip to content

Commit

Permalink
Merge pull request #847 from yuvipanda/no-node
Browse files Browse the repository at this point in the history
Remove nodesource' nodejs
  • Loading branch information
minrk authored Nov 23, 2021
2 parents 4da2e1e + 7aee21f commit 00769c0
Show file tree
Hide file tree
Showing 15 changed files with 371 additions and 361 deletions.
30 changes: 0 additions & 30 deletions repo2docker/buildpacks/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@
--uid ${NB_UID} \
${NB_USER}
RUN wget --quiet -O - https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
DISTRO="bionic" && \
echo "deb https://deb.nodesource.com/node_14.x $DISTRO main" >> /etc/apt/sources.list.d/nodesource.list && \
echo "deb-src https://deb.nodesource.com/node_14.x $DISTRO main" >> /etc/apt/sources.list.d/nodesource.list
# Base package installs are not super interesting to users, so hide their outputs
# If install fails for some reason, errors will still be printed
RUN apt-get -qq update && \
Expand Down Expand Up @@ -247,7 +242,6 @@ def get_base_packages(self):
return {
# Utils!
"less",
"nodejs",
"unzip",
}

Expand Down Expand Up @@ -622,32 +616,8 @@ def get_build_env(self):
"""Return env directives required for build"""
return [
("APP_BASE", "/srv"),
("NPM_DIR", "${APP_BASE}/npm"),
("NPM_CONFIG_GLOBALCONFIG", "${NPM_DIR}/npmrc"),
]

def get_path(self):
return super().get_path() + ["${NPM_DIR}/bin"]

def get_build_scripts(self):
scripts = [
(
"root",
r"""
mkdir -p ${NPM_DIR} && \
chown -R ${NB_USER}:${NB_USER} ${NPM_DIR}
""",
),
(
"${NB_USER}",
r"""
npm config --global set prefix ${NPM_DIR}
""",
),
]

return super().get_build_scripts() + scripts

def get_env(self):
"""Return env directives to be set after build"""
return []
Expand Down
14 changes: 13 additions & 1 deletion repo2docker/buildpacks/conda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def get_build_env(self):
env = super().get_build_env() + [
("CONDA_DIR", "${APP_BASE}/conda"),
("NB_PYTHON_PREFIX", "${CONDA_DIR}/envs/notebook"),
# We install npm / node from conda-forge
("NPM_DIR", "${APP_BASE}/npm"),
("NPM_CONFIG_GLOBALCONFIG", "${NPM_DIR}/npmrc"),
("NB_ENVIRONMENT_FILE", self._nb_environment_file),
]
if self._nb_requirements_file:
Expand Down Expand Up @@ -85,6 +88,8 @@ def get_path(self):
if self.py2:
path.insert(0, "${KERNEL_PYTHON_PREFIX}/bin")
path.insert(0, "${NB_PYTHON_PREFIX}/bin")
# This is at the end of $PATH, for backwards compat reasons
path.append("${NPM_DIR}/bin")
return path

def get_build_scripts(self):
Expand Down Expand Up @@ -113,7 +118,14 @@ def get_build_scripts(self):
bash -c 'time /tmp/install-miniforge.bash' && \
rm -rf /tmp/install-miniforge.bash /tmp/env
""",
)
),
(
"root",
r"""
mkdir -p ${NPM_DIR} && \
chown -R ${NB_USER}:${NB_USER} ${NPM_DIR}
""",
),
]

major_pythons = {"2": "2.7", "3": "3.7"}
Expand Down
137 changes: 70 additions & 67 deletions repo2docker/buildpacks/conda/environment.lock

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions repo2docker/buildpacks/conda/environment.py-2.7.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# AUTO GENERATED FROM environment.py-2.7.yml, DO NOT MANUALLY MODIFY
# Frozen on 2021-10-06 07:32:48 UTC
# Frozen on 2021-11-19 16:44:48 UTC
# Generated by conda-lock.
# platform: linux-64
# input_hash: 6e66c9e333cfc5d702bcabcb832e0f70ee70bd3ef21869e83a2db3596ce0d826
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2021.5.30-ha878542_0.tar.bz2#6a777890e94194dc94a29a76d2a7e721
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2021.10.8-ha878542_0.tar.bz2#575611b8a84f45960e87722eeb51fa26
https://conda.anaconda.org/conda-forge/linux-64/ld_impl_linux-64-2.36.1-hea4e1c9_2.tar.bz2#bd4f2e711b39af170e7ff15163fe87ee
https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-11.2.0-he4da1e4_9.tar.bz2#a41b94921f55a353a8bbf5bb8d5ca335
https://conda.anaconda.org/conda-forge/linux-64/libgomp-11.2.0-h1d223b6_9.tar.bz2#1090e28709184ec3d2f6ad6abd55fa31
https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-11.2.0-he4da1e4_11.tar.bz2#0bf83958e788f1e75ba26154cb702afe
https://conda.anaconda.org/conda-forge/linux-64/libgomp-11.2.0-h1d223b6_11.tar.bz2#1d16527c76842bf9c41e9399d39d8097
https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-1_gnu.tar.bz2#561e277319a41d4f24f5c05a9ef63c04
https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-11.2.0-h1d223b6_9.tar.bz2#84b1ec6f5b2d21968add479348515bba
https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-11.2.0-h1d223b6_11.tar.bz2#e3495f4f93cfd6b68021cbe2b5844cd5
https://conda.anaconda.org/conda-forge/linux-64/libffi-3.2.1-he1b5a44_1007.tar.bz2#11389072d7d6036fd811c3d9460475cd
https://conda.anaconda.org/conda-forge/linux-64/libsodium-1.0.17-h516909a_0.tar.bz2#a98437ebf6fbbc6e498c64636f3958cf
https://conda.anaconda.org/conda-forge/linux-64/libzlib-1.2.11-h36c2ea0_1013.tar.bz2#dcddf696ff5dfcab567100d691678e18
Expand All @@ -22,22 +22,22 @@ https://conda.anaconda.org/conda-forge/linux-64/zlib-1.2.11-h36c2ea0_1013.tar.bz
https://conda.anaconda.org/conda-forge/linux-64/sqlite-3.36.0-h9cd32fc_2.tar.bz2#3588c2c6cb9f9bcc65b544ab1c715d60
https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.11-h27826a3_1.tar.bz2#84e76fb280e735fec1efd2d21fd9cb27
https://conda.anaconda.org/conda-forge/linux-64/python-2.7.15-h5a48372_1011_cpython.tar.bz2#d1824ac0987155f58a03b7ffda01db38
https://conda.anaconda.org/conda-forge/linux-64/backports-1.0-py27_1.tar.bz2#eda57aeca994883cc314e03b71968668
https://conda.anaconda.org/conda-forge/linux-64/backports.shutil_get_terminal_size-1.0.0-py27_1.tar.bz2#539974750142343a3944ac010e475cb6
https://conda.anaconda.org/conda-forge/linux-64/backports_abc-0.5-py27_0.tar.bz2#125cc4f050a230395060f1f1349ec18e
https://conda.anaconda.org/conda-forge/noarch/backports-1.0-py_2.tar.bz2#0da16b293affa6ac31812376f8eb79dd
https://conda.anaconda.org/conda-forge/noarch/backports_abc-0.5-py_1.tar.bz2#6ac8cc52b55791b066dc43469bbaf8f2
https://conda.anaconda.org/conda-forge/noarch/decorator-4.4.2-py_0.tar.bz2#d2eabb9cabd212e1ec6a9463bd846243
https://conda.anaconda.org/conda-forge/linux-64/ipython_genutils-0.2.0-py27_0.tar.bz2#5e8c18afa86e5f3af13248316e202288
https://conda.anaconda.org/conda-forge/noarch/ipython_genutils-0.2.0-py_1.tar.bz2#5071c982548b3a20caf70462f04f5287
https://conda.anaconda.org/conda-forge/noarch/ptyprocess-0.7.0-pyhd3deb0d_0.tar.bz2#359eeb6536da0e687af562ed265ec263
https://conda.anaconda.org/conda-forge/linux-64/python_abi-2.7-1_cp27mu.tar.bz2#02d6ad6bce3a798e6ee85494cd9b3d8d
https://conda.anaconda.org/conda-forge/linux-64/simplegeneric-0.8.1-py27_0.tar.bz2#f1db3b1ec8ca72f3b1a26331b386aa51
https://conda.anaconda.org/conda-forge/noarch/simplegeneric-0.8.1-py_1.tar.bz2#a561caf8601e8d85547c77a54ee99333
https://conda.anaconda.org/conda-forge/noarch/six-1.16.0-pyh6c4a22f_0.tar.bz2#e5f25f8dbc060e9a8d912e432202afc2
https://conda.anaconda.org/conda-forge/noarch/wcwidth-0.1.9-pyh9f0ad1d_0.tar.bz2#ef10a99c7570762fa2a69218c171dbc8
https://conda.anaconda.org/conda-forge/noarch/wheel-0.37.0-pyhd8ed1ab_1.tar.bz2#3aa2c3e25dd361b453d010388b9cdff1
https://conda.anaconda.org/conda-forge/noarch/backports.shutil_get_terminal_size-1.0.0-py_3.tar.bz2#ed3c4ce59b457c5fd7ca79b94c57eff4
https://conda.anaconda.org/conda-forge/linux-64/certifi-2019.11.28-py27h8c360ce_1.tar.bz2#a345324a2547908c1f9ca4b65d93f5ba
https://conda.anaconda.org/conda-forge/linux-64/configparser-3.7.3-py27h8c360ce_2.tar.bz2#fce87da76335c7274cb858745fded401
https://conda.anaconda.org/conda-forge/linux-64/enum34-1.1.10-py27h8c360ce_1.tar.bz2#0af4ab7b9189611125ba54d99163f58d
https://conda.anaconda.org/conda-forge/linux-64/futures-3.3.0-py27h8c360ce_1.tar.bz2#2689f3fc54d3987298828719b0244005
https://conda.anaconda.org/conda-forge/linux-64/pexpect-4.8.0-py27h8c360ce_1.tar.bz2#e772596cb72ea97421227a22aefba64a
https://conda.anaconda.org/conda-forge/noarch/pexpect-4.8.0-pyh9f0ad1d_2.tar.bz2#5909e7b978141dd80d28dbf9de627827
https://conda.anaconda.org/conda-forge/noarch/python-dateutil-2.8.1-py_0.tar.bz2#0d0150ed9c2d25817f5324108d3f7571
https://conda.anaconda.org/conda-forge/linux-64/pyzmq-19.0.0-py27h76efe43_1.tar.bz2#0f578fd2966e4b2b910ffb3d39951645
https://conda.anaconda.org/conda-forge/linux-64/scandir-1.10.0-py27hdf8410d_1.tar.bz2#bfaf4b51772c5904b696ce7d68731397
Expand All @@ -52,6 +52,6 @@ https://conda.anaconda.org/conda-forge/linux-64/pickleshare-0.7.5-py27h8c360ce_1
https://conda.anaconda.org/conda-forge/noarch/pip-20.1.1-pyh9f0ad1d_0.tar.bz2#cd67a20c73ff2514cf5f34cae28fc867
https://conda.anaconda.org/conda-forge/noarch/pygments-2.5.2-py_0.tar.bz2#c48719b941c60b26add57de2b014ef96
https://conda.anaconda.org/conda-forge/linux-64/jupyter_client-5.3.4-py27_1.tar.bz2#ec6099141189dfae14367478d3e96fa9
https://conda.anaconda.org/conda-forge/linux-64/prompt_toolkit-1.0.15-py27_0.tar.bz2#e64d8ff5a16afcea0dff046bc837f6db
https://conda.anaconda.org/conda-forge/noarch/prompt_toolkit-1.0.15-py_1.tar.bz2#f5bea0930b268df84653cb32c8d1542f
https://conda.anaconda.org/conda-forge/linux-64/ipython-5.8.0-py27_1.tar.bz2#b95b11ff25dde76c6fa0c5620a8e90ad
https://conda.anaconda.org/conda-forge/linux-64/ipykernel-4.8.2-py27_0.tar.bz2#18141b1342f87e1607c5b389c2c12a81
30 changes: 18 additions & 12 deletions repo2docker/buildpacks/conda/environment.py-3.5.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
# py3.5 conda packages are no longer being updated as of 12/2018
# note: one update 11/2021 to shift nodejs into conda-env
# this file is hand-maintained now
# and should only receive security fixes, no new features
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-main.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2018.10.15-ha4d7672_0.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/libstdcxx-ng-7.2.0-hdf63c60_3.conda
https://repo.anaconda.com/pkgs/main/linux-64/libgcc-ng-7.2.0-hdf63c60_3.conda
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2021.10.8-ha878542_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libstdcxx-ng-11.2.0-he4da1e4_11.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libgomp-11.2.0-h1d223b6_11.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-1_gnu.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-11.2.0-h1d223b6_11.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/bzip2-1.0.6-h470a237_2.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/gmp-6.1.2-hfc679d8_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libffi-3.2.1-hfc679d8_5.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/icu-68.2-h9c3ff4c_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libffi-3.3-h58526e2_2.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libsodium-1.0.16-h470a237_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.1-hfc679d8_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/openssl-1.0.2p-h470a237_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.4-h470a237_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/libuv-1.42.0-h7f98852_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/ncurses-6.2-h58526e2_4.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/openssl-1.1.1l-h7f98852_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/xz-5.2.5-h516909a_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/zlib-1.2.11-h470a237_3.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/nodejs-14.17.4-h92b4a50_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/pandoc-1.19.2-0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/readline-7.0-haf1bffa_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.9-ha92aebf_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/readline-8.1-h46c0cb4_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/tk-8.6.11-h27826a3_1.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/zeromq-4.2.5-hfc679d8_6.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/sqlite-3.25.3-hb1c47c0_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/python-3.5.5-h5001a0f_2.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/sqlite-3.36.0-h9cd32fc_2.tar.bz2
https://repo.anaconda.com/pkgs/main/linux-64/python-3.5.6-h12debd9_1.conda
https://conda.anaconda.org/conda-forge/noarch/backcall-0.1.0-py_0.tar.bz2
https://conda.anaconda.org/conda-forge/linux-64/certifi-2018.8.24-py35_1001.tar.bz2
https://conda.anaconda.org/conda-forge/noarch/decorator-4.3.0-py_0.tar.bz2
Expand Down
Loading

0 comments on commit 00769c0

Please sign in to comment.