Wykres commitów

232 Commity (f2c1cb7a8c27726450a6bbbded5099478c8a8994)

Autor SHA1 Wiadomość Data
Tim Head 39c2ae276b Start reusing existing docker images if content hasn't changed
Content providers can specify a "content ID" which is used to identify
versions of the content. The ID is used in the docker image name and if
we find an existing image for a given content ID the build step is
skipped.
2018-11-04 13:23:04 +01:00
Chris Ostrouchov 1e3630cc10
Feature: Adding nix support for repo2docker
test url: https://gitlab.com/costrouc/nix-binder-example
2018-10-17 16:32:40 -04:00
Tim Head b1dcbbe996 Adjust sub-directory tests after changing CWD behaviour 2018-10-16 13:46:00 +02:00
Tim Head df7251dff6 Add context manager to change working dir
The context manager takes care of restoring the current working
directory when we are done. This is useful when the directory we set as
working directory stops existing.
2018-10-16 13:29:59 +02:00
Tim Head 4e1eff5f1b Switch repository used to test sub-directory support
Using a repository that contains invlid instructions in the root of the
repository so that the test for subdirectory support will fail if
repo2docker doesn't actually switch into the requested sub-directory.
2018-10-16 13:28:08 +02:00
Tim Head 05bdc12651 Expand comments and doc strings 2018-10-16 09:46:17 +02:00
Tim Head 98d46957f1 Expand comment about using a local directory as checkout and source 2018-10-16 08:04:13 +02:00
Tim Head c7dc5e1841 Remove explicit passing of logger instance 2018-10-16 08:04:13 +02:00
Tim Head e5c7fdd341 Use the local content provider
This let's us remove some special casing around local directories from
the build process.
2018-10-16 08:04:13 +02:00
Tim Head 866dd4f800 Start using content providers 2018-10-16 08:04:13 +02:00
Derek Ludwig 2d2738b6db Merge remote-tracking branch 'upstream/master' 2018-10-15 10:21:41 -07:00
Evert Rol e9a31df758 Add an edit-mode option
This adds an option to run from a local repository in edit mode, where
changes in a running Docker container (for example, through a
notebook) are reflected in the local repository.

Implements the feature suggested in #357
2018-10-05 14:08:51 +02:00
Evert Rol fca93270c9 Speed up cloning by using a depth of 1 if there is no refspec
To speed up cloning a repository, a shallow clone containing just the
last commit can be made, but *only* if no refspec is provided.
2018-10-01 15:51:24 +02:00
Derek Ludwig 39cf2411f9 Add error checking for subdir 2018-09-24 15:45:38 -07:00
Derek Ludwig da5e84472a Subdir support 2018-09-12 14:43:36 -07:00
Min RK 784bbff709
Merge pull request #358 from GladysNalvarte/connect_url
Specify custom_connect_url argument
2018-08-01 15:08:52 +02:00
Gladys Nalvarte 4587702119 Include corrections in app and test_connect_url files 2018-08-01 14:21:15 +02:00
Gladys Nalvarte 4c0cb69b80 Uses jupyter/notebook option to pass explicit hostname 2018-07-31 11:28:20 +02:00
Gladys Nalvarte 1512a6835a Explicit hostname supplied to the container 2018-07-20 11:45:01 +02:00
Vanessa Sochat 21f698c1b7
adding note to future developers about why version is checked first 2018-07-16 06:47:59 -07:00
Vanessa Sochat 80d7ec9ff3
removing extra blank lines 2018-07-16 06:46:53 -07:00
Vanessa Sochat a87f9520f1
adding version argument 2018-07-16 06:05:43 -07:00
Min RK 8075c5bf10
Merge pull request #343 from GladysNalvarte/split-docker-image
Test that images can start notebook servers in all the builders
2018-07-04 15:15:53 +02:00
Gladys Nalvarte 89686833c0 Updated app.py to make sure that images can start notebook servers
Includes an update of conftest.py file to check that the container
is running with jupyter notebook in all the builders.
2018-07-03 10:55:31 +02:00
Chris Holdgraf 544b1ba039 improving ref checker 2018-06-27 11:35:17 -07:00
Chris Holdgraf 728fb9707e adding a ref checker util 2018-06-27 09:25:07 -07:00
Chris Holdgraf 8beb5e07bc checking for origin/ explicitly 2018-06-27 08:30:10 -07:00
Chris Holdgraf b1f504c480 Merge branch 'docs' of https://github.com/choldgraf/repo2docker into docs 2018-06-27 08:26:01 -07:00
Chris Holdgraf c035dd22d4 auto-cleaning refs and updating tests for this 2018-06-27 08:25:05 -07:00
J. Forde e1d47df30e fixing conflict 2018-06-26 15:54:31 -07:00
Min RK 8adc402a04 Split run_image into two steps
for easier testing of image-running logic
2018-06-15 13:08:20 +02:00
Min RK 91fdfb4c29 prefer R to conda
allows mixing conda and R because R inherits from Python (and thereby conda)
2018-05-23 15:52:08 +02:00
Chris Holdgraf 8c22e42ee4 adding test and more informative error 2018-04-24 16:51:39 -07:00
Chris Holdgraf e4b680de3f adding docs about ref 2018-04-23 14:30:39 -07:00
Min RK 6b15b01fbd inherit PythonBuildPack from conda buildpack
- sets up base env with conda
- installs packages with pip
- eliminates duplicate frozen envs for pip
- py3/py2 split happens in one class, not separate classes
2018-04-16 10:56:39 +02:00
Carol Willing 245e7d1995 update validation logic error message and docstring 2018-03-15 12:28:11 -07:00
Carol Willing c231531f72 add yuvipanda text suggestions 2018-03-15 12:14:34 -07:00
Carol Willing 5b73968b1c add docstrings and minor style edits 2018-03-15 12:14:33 -07:00
Carol Willing 9b25188928 organize imports 2018-03-15 12:12:44 -07:00
Min RK c857f438b3 add appendix
supports adding arbitrary build steps to the end of Dockerfile
2018-02-14 11:34:10 +01:00
Yuvi Panda 4e174313f0
Merge pull request #229 from minrk/memtest
instantiate Repo2Docker to run tests
2018-02-12 11:24:10 -08:00
Min RK 3ab4503f7c clone recursively
ensures submodules, if any, are included
2018-02-12 13:16:06 +01:00
Min RK c164ef42b3 avoid calling sys.exit on success 2018-02-09 16:48:26 +01:00
Min RK 69db8f0ecb allow passing argv to repo2docker.initialize
matching existing Applications
2018-02-09 16:48:26 +01:00
Min RK 1ffec7ded6 do not reuse BuildPack instances
rather than instantiating all buildpacks ahead of time, only instantiate as needed.

Makes it clear that a given BuildPack should only perform a single build
and a new BuildPack should be created for a subsequent build.
2018-02-09 13:14:34 +01:00
yuvipanda e2099dbc97 Add basic R + IRKernel + RStudio support
This sets up R + RStudio + IRKernel for a repository that contains:

 1. A `runtime.txt` file with the text:

	r-<year>-<month>-<date>

	Where 'year', 'month' and 'date' refer to a specific
	date snapshot of https://mran.microsoft.com/timemachine
	from which libraries are to be installed.

 2. An optional `install.R` file that will be executed at build time,
	and can be used for installing packages from both MRAN and GitHub.

It currently sets up R from the ubuntu repository being used. This
is unideal, and we should investigate other solutions!

Fixes #24
2018-02-02 09:25:19 -08:00
yuvipanda 398c82ee59 Add JuliaBuildPack to list of buildpacks 2018-02-01 15:55:58 -08:00
yuvipanda e3bf8a16c6 Remove usage of LoggingConfigurable in BuildPack 2018-02-01 04:27:15 -08:00
yuvipanda 4d19924180 Use inheritance to define composed buildpacks
- This is much cleaner to understand than traitlets
- Remove 'name' and 'component' traitlets
2018-02-01 04:23:34 -08:00
Mukundan Sundararajan 515db356bf Added checks to gracefully handle docker connect errors
Print actual error message on Docker client init errors
2018-01-11 17:43:29 -08:00
Mukundan Sundararajan 549bd9663b add ability for port mapping to work with non jupyter-workflow
Added tests for port mapping
Added tests for publish all exposed ports
Added argument validation for ports argument
Added short form for argument publish. Changed variable name port to ports.
2018-01-11 16:49:09 -08:00
Romain Primet d5d9b894b6 change parameter handling to 'action=append' 2018-01-09 08:22:38 +00:00
Romain Primet 5f95a5ddd3 Provide a flag to pass environment variables at runtime 2018-01-08 19:58:34 +00:00
Mukundan Sundararajan 9e2edb910a Fixed run argument check for mounting volumes. Refactored argument validation test. 2017-12-24 15:03:09 -08:00
Yuvi Panda 5293080add
Merge pull request #175 from mukundans91/validateImageName
Added regex pattern based validation for image name argument
2017-12-23 15:11:02 -08:00
Mukundan Sundararajan 174c8000d2 Removed class and added function to validate docker image name 2017-12-22 19:45:16 -08:00
Mukundan Sundararajan b6414c3ef4 Added a regex based patter definition for Image name 2017-12-22 16:17:32 -08:00
Mukundan Sundararajan f04aa4da97 Changed to google style docstrings. Added image_name validation test. 2017-12-22 03:38:58 -08:00
yuvipanda 84c65445d2 Add missing import 2017-12-21 14:30:10 -08:00
yuvipanda 5674c0f7c6 Default username and user_id to currently running user
This is the defaults that you want if you are using r2d on your
local computer.
2017-12-21 14:01:22 -08:00
Mukundan Sundararajan 5372b09333 Added lowercase validation for image name argument 2017-12-20 19:41:20 -08:00
yuvipanda 66ad81d42b Fix error message + fix some formatting 2017-12-19 12:49:53 -08:00
yuvipanda 8f36572770 Allow passing in uid and username of user built into image
This allows volumes to properly respect the uid of the user
from the host. Much easier than using user namespaces
2017-12-19 12:46:22 -08:00
yuvipanda 988f9dded8 Add support for relative paths in the volume destination too 2017-12-19 11:32:59 -08:00
yuvipanda 0c0d921276 Set default for volumes in argparse
This prevents code from failing when volumes are not specified
2017-12-19 11:15:43 -08:00
yuvipanda e6a13eb8ba Allow mounting arbitrary volumes into the repo2docker container
Tries to mimick the docker run '-v' syntax, but only supports
rw volumes for now. Source can be a relative path, but destination
needs to be an absolute path.
2017-12-19 11:04:20 -08:00
Tim Head b893463735 Apply PEP8 style roller 2017-12-08 15:32:21 +01:00
yuvipanda 2db2fd7543 Remove extra - in argparse definition 2017-11-30 17:23:00 -08:00
yuvipanda 86c24c1a18 Set limits for how much memory docker build can use
This prevents builds from gobbling all the RAM on a node!
2017-11-30 17:14:42 -08:00
yuvipanda 1ddaf0bcb1 Split detectors.py into individual files
These were buildpacks now anyway, not detectors.
2017-11-30 01:29:40 -08:00
Yuvi Panda 88f7b34fed
Merge pull request #118 from betatim/tempfile
[MRG] Use stdlib tempfile module
2017-11-09 16:14:09 -06:00
Tim Head 5ff228deca Fix argument definition 2017-11-09 16:41:00 +01:00
Yuvi Panda a7b1519b4d
Revert "[MRG] Add limit on git clone depth" 2017-11-01 16:27:26 -07:00
Yuvi Panda cad9deb7d0
Revert "Add handling for no ref being provided" 2017-11-01 16:23:29 -07:00
Tim Head cb1b1442f2 Add handling for no ref being provided
We do not need to checkout a specific ref if none is provided. Added a
test to check the behaviour.
2017-11-01 21:56:13 +01:00
Tim Head 5242bd8339 Switch to using context manager for cleanup 2017-11-01 21:15:27 +01:00
Tim Head 5b48e60505 Switch to exceptions instead of exit() and add a new test 2017-10-31 11:09:46 +01:00
Tim Head c19d037036 Add check for ref and deep clone
If the ref does not exist in the shallow clone, create a full clone of
the repository and retry.
2017-10-26 21:14:41 +02:00
Tim Head 8caeffdbbd Add limit on git clone depth
Only checkout last 50 commits from a remote repository. This helps speed
up the cloning for large repositories.
2017-10-26 21:14:41 +02:00
Min RK fc4aeda557 Merge pull request #111 from willingc/remove-jhub
Remove jupyterhub from default installs
2017-10-25 15:35:14 +02:00
Tim Head f6ce444450 Use stdlib tempfile module
The tempfile module can take care of finding a good temporary directory
for us on paltforms where `/tmp` does not exist.
2017-10-24 23:25:34 +02:00
Carol Willing fd5f98d5eb Edit per @yuvipanda review 2017-10-23 15:39:01 -07:00
Carol Willing 991e4ad4e2 update docstring to include binderhub 2017-10-23 09:19:33 -07:00
yuvipanda 5f521e21e1 Use argparse.REMAINDER instead of action=append
This gathers up all the remaining parameters without misinterpreting
parameters like --no-build etc as part of cmd
2017-10-23 08:53:33 -07:00
yuvipanda 964fbcf57c Fix handling of 'cmd'
nargs='*' made a lot of other parsing fail with strange
errors.
2017-10-23 08:38:04 -07:00
Chris Holdgraf 01574946f5 Re-order arguments to make more intuitive sense 2017-10-23 08:37:10 -07:00
Min RK edbb8dc609 avoid producing non-JSON output on errors
register a custom excepthook that is called instead of the default traceback formatter.
This produces a phase: failed message with the error.
2017-10-17 14:04:16 +02:00
Natalino Busa a9f9255541 More forgiving rmtree 2017-09-12 00:54:59 +08:00
Chris Holdgraf 065d00aa71 Merge pull request #75 from minrk/typo
typo: --print-dockerfile ended up falling under --debug
2017-09-08 14:30:24 -07:00
Min RK dd25515a83 ensure composed buildpacks inherit application config
so that configurable buildpacks can be configured
2017-09-07 14:30:17 +02:00
Min RK 05b8d662ea typo: --print-dockerfile ended up falling under --debug 2017-09-07 14:21:11 +02:00
yuvipanda d116c30498 Output Dockerfile contents if set to --debug
The Dockerfile we generate won't really work at all outside
of repo2docker. This makes it very clear that these are purely
for debugging purposes.
2017-08-27 11:04:01 -04:00
yuvipanda 3b226d183b Add --print-dockerfile & --no-build options 2017-08-27 10:51:01 -04:00
yuvipanda 2e9954a6c6 Add back --no-clean support
And remove some traitlets we are no longer using
2017-07-30 03:44:21 -07:00
yuvipanda 3266c2bdc8 Silence massive unreadable error messages when fetching base images 2017-07-29 23:33:43 -07:00
yuvipanda 8edc1ce0e0 Actually tell docker to bind ports 2017-07-29 20:14:36 -07:00
yuvipanda fcb318c5e8 Refresh container state before trying to kill it
Stops racy tests where sometimes the container is already
dead before we try to kill it
2017-07-29 17:36:07 -07:00
yuvipanda b187df0637 Mark py3 venv as default buildpack 2017-07-29 17:17:18 -07:00
yuvipanda ad43fa3aab Pass exit code of container back 2017-07-29 14:31:23 -07:00
yuvipanda 65c89e1f61 Properly support local directories
We don't need git!
2017-07-29 14:17:32 -07:00
yuvipanda 64bf17513f Switch to using argparse for commandline parsing
Is cleaner and less hacky than using Traitlets. We still
use traitlets for configuration, and accept a config file
for configuring detectors and what not.

Also implements allowing arbitrary commands from the commandline,
so we can do things like build and test a container!
2017-07-28 23:46:04 -07:00
yuvipanda 5225cfc1d4 Cleanup default logging for interactive use 2017-07-28 20:06:54 -07:00
yuvipanda b4215161fb Break properly when no builders are found 2017-07-28 19:35:17 -07:00
yuvipanda 4af4eb471f Stop building once you've built one image! 2017-07-28 19:35:17 -07:00
yuvipanda 523b30cf7b Make the repo2docker app work with new buildpacks 2017-07-28 19:35:17 -07:00
yuvipanda 6a4aa2f3aa Add support for Julia buildpack
- Looks for REQUIRE file in a repo, assumes is Julia
- Version pinned to v0.5.2 now - in the future, pick one
  based on presence of Julia spec in REQUIRE

Fixes #23
2017-06-14 23:58:31 -07:00
yuvipanda 51c5f72b45 Remove docker-pull hack
No longer check if image exists by doing a docker-pull -
binderhub will no longer start a build if it knows that
the image already exists
2017-05-30 22:43:33 -07:00
yuvipanda acb0d86027 Add a default build pack
Gives you a blank python3 environment
2017-05-30 13:58:19 -07:00
Min RK 766eee29e6 add legacy binder dockerfile buildpack
- stages files, which previous binder did automatically and repo2docker does not
- installs required versions of ipykernel, jupyterhub, notebook
- registers kernelspecs explicitly
- launches notebook server with python3 env
- removes nb_conda_kernels, which was causing trouble
- sets JUPYTER_PATH so kernelspecs and extensions that were being installed into the python 2 env will still be picked up
2017-05-25 15:15:37 -07:00
Min RK f3505db967 only capture logs when doing json logging
and don’t do json logging by default

log messages include newlines, carriage returns so that they can be handled correctly in terminal frontends
2017-05-24 14:11:37 -07:00
Min RK 3ca1c47eda Merge pull request #10 from jupyter/port-forward
Use same port in host and docker container
2017-05-24 12:25:15 -07:00
Yuvi Panda 11eb57cbb1 Merge pull request #12 from minrk/bundle-s2i
bundle s2i in wheels
2017-05-24 12:07:56 -07:00
Min RK c158daab9d use bundled s2i by adding package to PATH 2017-05-24 09:49:23 -07:00
yuvipanda cb11332c6f Use same port in host and docker container
Makes it work on Linux and the default OS X install I think
2017-05-23 18:09:02 -07:00
yuvipanda c7dae78a51 Move image existence check to a separate repo 2017-05-23 17:56:03 -07:00
Min RK 7924113649 support repo as positional arg
and flesh out some Application basics: version, name, docstring
2017-05-23 12:29:27 -07:00
yuvipanda b9efde90e9 Print out the host port number in a log message
Eventually, we should actually be passing the port number
inside the docker container, after verifying that it is available
on the host. We can deal with races by doing the same thing that
ipython notebook does.
2017-05-22 23:57:40 -07:00
yuvipanda a0f539faaf Don't use host network for running containers
- Doesn't really work on OS X. BOO!
2017-05-22 23:33:23 -07:00
yuvipanda 9adb8aa947 Use host networking when running
Since we only expect this to be happening on users computers
when they are running this to test, host networking solves a
bunch of surprises around access to ports, as well as figuring
out which port the notebook should be listening on (since it
can just rely on the logic inside the notebook)

Dangerous when run on a cloud environment!
2017-05-22 23:02:18 -07:00
yuvipanda 9fca3bf480 Kill the container when our program exits 2017-05-22 23:00:37 -07:00
yuvipanda 6505ddc564 Allow running just-built container
- make push optional
2017-05-22 22:55:17 -07:00
yuvipanda ae124ec2f7 Make push optional and default to False
Let's optimize the defaults for good commandline usage rather
than for binderhub usage
2017-05-22 22:17:02 -07:00
yuvipanda 542c7a9a1c Set default repo source to full path of current dir
Rather than just '.'
2017-05-22 22:16:46 -07:00
yuvipanda 657db33017 Set a default image name if none is provided
It's kind of shitty but better than just erroring.
2017-05-22 22:16:30 -07:00
yuvipanda e3224392e0 Add a __main__ and an entrypoint 2017-05-22 20:39:12 -07:00
yuvipanda 13226e1f27 Rename source_url and source_ref to repo and ref
Makes more sense, and also now consistent with the repository
name
2017-05-22 20:32:13 -07:00
yuvipanda 310bc0fbfe Add a little more bit of documentation 2017-05-22 20:28:28 -07:00
yuvipanda e2991f614a Specify the type of buildpack list elements 2017-05-22 20:26:47 -07:00
yuvipanda 25c203c356 Minor variable name cleanup 2017-05-22 20:26:27 -07:00
yuvipanda adbe908355 Rename alias for output image
Makes more sense
2017-05-22 20:13:20 -07:00
yuvipanda 46b08a21dd Add more docs 2017-05-22 20:10:59 -07:00
yuvipanda 93972e9b58 Rename builder to repo2docker
Package name is jupyter-repo2docker
2017-05-22 16:22:36 -07:00