# Setting Up your Code

NetBook training server automatically tries to create a docker image for your training code to run on Kubernetes.&#x20;

For NetBook to automatically create a docker image, here are the files we read from repo with the order of priority

We use <https://github.com/jupyterhub/repo2docker> to make it work

This currently supports and installs based on the following files in the repo

* [Configuration Files](https://repo2docker.readthedocs.io/en/latest/config_files.html)
  * [`environment.yml` - Install a conda environment](https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment)
  * [`Pipfile` and/or `Pipfile.lock` - Install a Python environment](https://repo2docker.readthedocs.io/en/latest/config_files.html#pipfile-and-or-pipfile-lock-install-a-python-environment)
  * [`requirements.txt` - Install a Python environment](https://repo2docker.readthedocs.io/en/latest/config_files.html#requirements-txt-install-a-python-environment)
  * [`setup.py` - Install Python packages](https://repo2docker.readthedocs.io/en/latest/config_files.html#setup-py-install-python-packages)
  * [`Project.toml` - Install a Julia environment](https://repo2docker.readthedocs.io/en/latest/config_files.html#project-toml-install-a-julia-environment)
  * [`REQUIRE` - Install a Julia environment (legacy)](https://repo2docker.readthedocs.io/en/latest/config_files.html#require-install-a-julia-environment-legacy)
  * [`install.R` - Install an R/RStudio environment](https://repo2docker.readthedocs.io/en/latest/config_files.html#install-r-install-an-r-rstudio-environment)
  * [`apt.txt` - Install packages with apt-get](https://repo2docker.readthedocs.io/en/latest/config_files.html#apt-txt-install-packages-with-apt-get)
  * [`DESCRIPTION` - Install an R package](https://repo2docker.readthedocs.io/en/latest/config_files.html#description-install-an-r-package)
  * [`postBuild` - Run code after installing the environment](https://repo2docker.readthedocs.io/en/latest/config_files.html#postbuild-run-code-after-installing-the-environment)
  * [`start` - Run code before the user sessions starts](https://repo2docker.readthedocs.io/en/latest/config_files.html#start-run-code-before-the-user-sessions-starts)
  * [`runtime.txt` - Specifying runtimes](https://repo2docker.readthedocs.io/en/latest/config_files.html#runtime-txt-specifying-runtimes)
  * [`default.nix` - the nix package manager](https://repo2docker.readthedocs.io/en/latest/config_files.html#default-nix-the-nix-package-manager)
  * [`Dockerfile` - Advanced environments](https://repo2docker.readthedocs.io/en/latest/config_files.html#dockerfile-advanced-environments)

You can also provide a custom training docker and NetBook can directly use the training docker rather than creating one. To use this, check [creating-training-docker-image](https://netbook-2.gitbook.io/netbook-docs/the-basics/components/experiments/creating-training-docker-image "mention")
