repo2docker/docs/source/faq.md

73 wiersze
2.7 KiB
Markdown
Czysty Zwykły widok Historia

# Frequently Asked Questions (FAQ)
A collection of frequently asked questions with answers. If you have a question
2018-07-05 18:25:43 +00:00
and have found an answer, send a PR to add it here!
## How should I specify another version of Python?
2017-12-07 18:50:46 +00:00
One can specify a Python version in the ``environment.yml`` file of a repository.
2017-12-07 18:50:46 +00:00
## What versions of Python (or R or Julia...) are supported?
### Python
Repo2docker officially supports the following versions of Python (specified in environment.yml or runtime.txt):
- 3.7 (added in 0.7)
- 3.6 (default)
- 3.5
Additional versions may work, as long as the
[base environment](https://github.com/jupyter/repo2docker/blob/master/repo2docker/buildpacks/conda/environment.yml)
can be installed for your version of Python.
The most likely source of incompatibility is if one of the packages
in the base environment is not packaged for your Python,
either because the version of the package is too new and your chosen Python is too old,
or vice versa.
Additionally, if Python 2.7 is specified,
a separate environment for the kernel will be installed with Python 2.
The notebook server will run in the default Python 3.6 environment.
### Julia
The following versions of Julia are supported (specified in REQUIRE):
- 1.0 (added in 0.7)
- 0.7 (added in 0.7)
- 0.6 (default)
### R
Only R 3.4.4 is currently supported, which is installed via `apt` from the
[ubuntu bionic repository](https://packages.ubuntu.com/bionic/r-base).
2018-05-19 17:06:10 +00:00
## Can I add executable files to the user's PATH?
2018-05-19 15:02:59 +00:00
Yes! With a :ref:`postBuild` file, you can place any files that should be called
2018-05-19 15:02:59 +00:00
from the command line in the folder ``~/.local/``. This folder will be
available in a user's PATH, and can be run from the command line (or as
a subsequent build step.)
## How do I set environment variables?
Use the `-e` or `--env` flag for each variable that you want to define.
For example `jupyter-repo2docker -e VAR1=val1 -e VAR2=val2 ...`
## Can I use repo2docker to bootstrap my own Dockerfile?
2017-10-24 23:09:09 +00:00
No, you can't.
If you pass the `--debug` flag to `repo2docker`, it outputs the intermediate
2017-10-24 23:09:09 +00:00
Dockerfile that is used to build the docker image. While it is tempting to copy
this as a base for your own Dockerfile, that is not supported & in most cases
will not work. The `--debug` output is just our intermediate generated
Dockerfile, and is meant to be built in
[a very specific way](https://github.com/jupyter/repo2docker/blob/master/repo2docker/detectors.py#L381).
Hence the output of `--debug` can not be built with a normal `docker build -t .`
or similar traditional docker command.
Check out the [binder-examples](http://github.com/binder-examples/) GitHub
organization for example repositories you can copy & modify for your own use!