Wykres commitów

124 Commity (15a1fb6e2d22c013523835280e19c186e605b05f)

Autor SHA1 Wiadomość Data
Erik Sundell 15a1fb6e2d refactor: manually add transitions to f-strings 2022-10-31 21:22:32 +01:00
pre-commit-ci[bot] 5a93542321 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-31 21:22:32 +01:00
Erik Sundell 2f13af8a29 Apply suggestions from code review 2022-10-31 13:09:17 +01:00
Nicholas Bollweg df733fc81b normalize ENV syntax, combine more layers 2022-10-31 13:09:17 +01:00
Nicholas Bollweg 803a1c223b ensure existence/permissions on custom target dir, if doesn't exist, repo copy slash 2022-10-31 13:09:17 +01:00
Min RK 945c45299f set USER root after each directive block
matches expectations in the directive sequences

not strictly required after preassemble because we have no root steps between preassemble and assemble,
so we could remove the `last_user = "root"` there instead

includes regression test
2022-01-25 14:48:37 +01:00
YuviPanda cbda2eba2b Move npm config setting to the conda buildpack
Since everything is based off the conda buildpack now,
and that is where we get npm from
2021-07-03 02:09:46 +05:30
YuviPanda 1d53990f34 Remove nodesource' nodejs
We get node from the default JupyterLab install, since that
comes from conda-forge. This was not the case when we started -
we installed JupyterLab with pip. We no longer need the nodesource
node.

All the env vars, etc should still work!
2021-07-03 02:09:46 +05:30
Simon Li c521c3c950 Remove constant docker args 2021-07-02 12:42:12 +01:00
Min RK b36a6a75f5 simplify python entrypoint
- remove redundant monitor sibling process
- use python3-login executable instead of login shell subprocess
  (same effect, but in more natural order)
- use non-blocking binary IO in tee instead of readline
  (switch to binary mode, as text wrappers don't support non-blocking mode
   see https://bugs.python.org/issue13322)
2021-03-09 10:45:47 +01:00
Min RK ebf640cb84 implement entrypoint in Python
- make sure to set PYTHONUNBUFFERED
- implement tee with subprocess readlines
- forward all relevant signals from entrypoint to 'true' command
- add monitor process to ensure child shuts down if parent does (maybe not useful in docker?)
2021-02-17 16:13:42 +01:00
Jeremy Tuloup 53a9071e5e Update to node 14 2020-11-20 09:38:44 +01:00
Min RK edfca79371 Remove support for stencila
Changes in stencila mean it doesn't work anymore and it's not feasible to update nbstencilaproxy

Instead, show only a warning about removed support for stencila
2020-11-19 18:17:23 +01:00
Kyungdahm Yun 8f714b48be Ensure REPO_DIR owned by NB_USER 2020-10-18 00:39:49 -07:00
Nicholas Bollweg 778c914c8c use jinja var for COPY chown 2020-10-15 08:58:12 -04:00
Nicholas Bollweg dc559b825a add chown to COPY commands to reduce layer count 2020-10-14 23:18:18 -04:00
Simon Li 2f15586474
Update repo2docker/buildpacks/base.py
Co-Authored-By: Tim Head <betatim@gmail.com>
2019-10-06 11:38:36 +01:00
Simon Li 91b7d752b6 adduser: useradd --no-log-init to reduce lastlog size
If the Docker host does not support sparse files /var/log/lastlog can be extremely large if a large UID is set. --no-log-init prevents lastlog being created.
2019-10-05 23:45:12 +01:00
Min RK 4f428c3055
Merge pull request #681 from Xarthisius/abspath_in_scripts
[MRG] Allow absolute paths in build_script_files. Fixes #673
2019-09-07 12:33:14 +02:00
Min RK 31da8e32b1 run chown as root 2019-07-18 17:55:38 +02:00
Min RK 654be046ac set permissions on repo_dir prior to preassemble 2019-07-18 14:40:08 +02:00
Min RK 5b12e072b1 move stencila to preassemble 2019-07-16 08:35:35 +02:00
Tim Head 09b84811ae Make sure all loops over dict items are deterministic 2019-07-12 07:23:41 +02:00
Tim Head 66227f85b4 Detect failure of pre-assembly in R buildpack
If the pre-assembly step succeeds we do not re-run it after copying the
repository contents.
2019-07-06 16:21:29 +02:00
Kacper Kowalik (Xarthisius) 24234d9365
Allow absolute paths in build_script_files. Fixes #673 2019-06-28 08:44:11 -05:00
Tim Head 10ca25d986 Install APT packages before copying the repo contents 2019-06-25 12:57:54 +02:00
Tim Head 8b004e06dc Apply auto formatting
Apologies to anyone finding this commit via git blame or log

run the autoformatting by

    pre-commit run --all-files
2019-06-03 21:37:25 +02:00
yuvipanda 74fc378230 Clarify comment around memswap & memory 2019-05-08 09:44:58 -07:00
Tim Head 2eb4781c2e Swap limit doesn't have to be bigger than memory limit 2019-05-08 18:22:11 +02:00
Tim Head 032baf6d04 Add check to `build()` for memory limit type 2019-05-08 14:23:43 +02:00
Tim Head ef2860371a Fix memory limits set for container image builds 2019-05-08 08:11:38 +02:00
yuvipanda 4dd32f3563 Make sure ENTRYPOINT is an absolute path
Unlike other parts of the generated Dockerfile,
the start script is evaluated at run time, rather
than at build time. Currently, we assume that the
current working directory is the same at runtime
as build time for the start script. This doesn't
hold true always, and particularly not in JupyterHub
environments where ${HOME} is often overlaid with
a persistent directory.

We change this to always refer to the full path,
using the ${REPO_DIR} environment variable. This
lets people building JupyterHub images to set
REPO_DIR to something like /srv/repo (like hubploy
does), and still have a working start script.
2019-04-30 10:04:53 -07:00
Tim Head 5e67e3c743
Support .binder directory (#653)
Support .binder directory
2019-04-30 18:29:38 +02:00
Tim Head e15007d528 Make sure start script is executable 2019-04-30 08:43:19 +02:00
Joseph Hamman 7ac4cb4932 error if both binder and .binder dirs exist 2019-04-29 08:05:49 -07:00
Joseph Hamman e83b12f5b2 add missing break 2019-04-29 06:47:51 -07:00
Joseph Hamman c230c70f4e support for .binder directory 2019-04-27 17:01:20 -07:00
Min RK 15a23711e6 invoke start script from our entrypoint
rather than replacing our entrypoint
2019-04-25 15:56:26 +02:00
Min RK 9678dde251 install notebook in its own env
leave the conda root env alone

adds conda activation to profile.d and ensures that we
start with a login shell via the ENTRYPOINT
2019-04-25 15:44:51 +02:00
Gladys Nalvarte 5bf2eadcf8 Exposes CPU limit 2019-02-15 14:57:58 +01:00
Gladys Nalvarte 8c6329de61 npm installation 2019-02-07 15:36:00 +01:00
benjamin 234e0b62d3 Moved postBuild comment into the condition. 2019-01-05 19:42:15 +00:00
yuvipanda 29407aa83f Put ${REPO_PATH}/.local/bin in PATH too 2018-12-18 11:50:35 -08:00
yuvipanda 21154d3b86 Use REPO_DIR rather than REPO_PATH
https://github.com/jupyter/repo2docker/pull/507#issuecomment-448184651
is a good justification
2018-12-18 11:50:35 -08:00
yuvipanda 0f3076387a Set REPO_PATH as late as possible
Leads to maximum cache re-use
2018-12-18 11:50:24 -08:00
yuvipanda 3dfe0a8143 Copy repo to ${REPO_DIR} rather than ${HOME}
We want to put the repo somewhere other than ${HOME}
so we can mount persistent storage in ${HOME} more easily.
Most of repo2docker assumes current directory is where
the contents are, so we should be able to get most of it
working by setting WORKDIR to ${REPO_PATH} and letting
${REPO_PATH} be configurable.

Unclear what to do for plain Dockerfiles, Legacy Dockerfiles &
nix.
2018-12-18 11:50:24 -08:00
yuvipanda 7eb1ac46af Redirect apt-get install output to /dev/null
`apt-get install` calls `dpkg` underneath to do the
installation. Unfortunately, `-qq` does not get passed
through, and we end up with a lot of log output even with
`-qq`. Redirecting stdout to /dev/null stops this output.
Errors come out to stderr, so those will be displayed.
2018-12-17 16:31:14 -08:00
yuvipanda 6ec05e3693 Pass quiet flag to apt properly
-qq is a parameter to 'apt-get' rather than the subcommand
2018-12-17 16:28:48 -08:00
yuvipanda b555adda43 Fix cache-busting when running tests locally
When you run repo2docker locally, the uid is usually set
to the current user's uid. However, when we push the content
to Docker, we invariably set the uid of the scripts we
use as part of repo2docker at 1000. This causes a cache bust
every time.

This patch uses the correct uid, and fixes cache busting. Makes
local test runs *much* faster.

Fixes #508
2018-12-16 11:15:36 -08:00
James Bourbeau 624ad94073 Remove getattr usage 2018-12-13 11:09:50 -06:00