You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Anaconda terms of service](https://www.anaconda.com/terms-of-service).
56
54
-[A blog entry on Anaconda commercial edition](https://www.anaconda.com/blog/anaconda-commercial-edition-faq).
57
55
58
-
1) Create **conda environment file** env.yml:
56
+
1) Create a **Conda environment file**`env.yml`:
59
57
60
-
*[Create manually a new file](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually) or
61
-
*[Create the file from existing conda installation](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#sharing-an-environment). For example: `conda env export -n <target_env_name> > env.yml`.
62
-
* If the existing environment is on a Windows and MacOS machine, it might need the [`--from-history` flag](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#exporting-an-environment-file-across-platforms), to get a .yml file suitable for Linux.
63
-
* If the existing environment is on a Linux machine with x86 CPU architecture, it is possible also to use [`--explicit` flag](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#building-identical-conda-environments)
58
+
-[Create manually a new file](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually) or
59
+
-[Create the file from an existing Conda installation](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#sharing-an-environment). For example: `conda env export -n <target_env_name> > env.yml`.
60
+
- If the existing environment is on a Windows or MacOS machine, the [`--from-history` flag](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#exporting-an-environment-file-across-platforms) might be required to get a `.yml` file suitable for Linux.
61
+
- If the existing environment is on a Linux machine with x86 CPU architecture, it is also possible to use [`--explicit` flag](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#building-identical-conda-environments).
64
62
65
63
An example of a suitable `env.yml` file would be:
66
64
@@ -73,48 +71,61 @@ dependencies:
73
71
- nglview
74
72
```
75
73
74
+
!!! info
75
+
The `channels` field lists which channels the packages should be pulled from
76
+
to this environment, whereas the `dependencies` field lists the actual Conda
77
+
packages that will be installed into the environment. Note that Conda uses a
78
+
channel priority for determining where to install packages from, i.e. it tries
79
+
to first install packages from the first listed channel. If no package versions
80
+
are specified, Conda always installs the latest versions.
76
81
77
-
2) Create new directory for installation <install_dir>. Likely `/projappl/<your_project>/..` is a good place.
82
+
2) Create a new directory `<install_dir>` for the installation. `/projappl/<your_project>/...`
83
+
is recommended.
78
84
79
-
3) Create installation
85
+
3) Create the installation:
80
86
81
87
```bash
82
88
conda-containerize new --prefix <install_dir> env.yml
83
89
```
84
90
85
-
4) Add the bin directory `<install_dir>/bin` to the path.
91
+
4) Add the `<install_dir>/bin` directory to your `$PATH`:
86
92
87
93
```bash
88
94
export PATH="<install_dir>/bin:$PATH"
89
95
```
90
96
91
-
5) You can call python and any other executables conda has installed in the same way as if you had activated the environment.
97
+
5) Now you can call `python` and any other executables Conda has installed in the same
98
+
way as if you had activated the environment.
92
99
93
-
### pip with conda
100
+
### Pip with Conda
94
101
95
-
To install some additional pip packages, add the `-r <req_file>` argument e.g:
102
+
To install some additional pip packages, add the `-r <req_file>` argument, e.g.:
96
103
97
-
```
104
+
```bash
98
105
conda-containerize new -r req.txt --prefix <install_dir> env.yml
99
106
```
100
107
101
-
### mamba
102
-
The tool also supports using [mamba](https://github.com/mamba-org/mamba)
103
-
for installing packages. Mamba often finds suitable packages much faster than conda, so it is a good option when required package list is long. Enable this feature by adding the `--mamba` flag.
108
+
### Mamba
104
109
105
-
```
110
+
The tool also supports using [Mamba](https://github.com/mamba-org/mamba) for installing
111
+
packages. Mamba often finds suitable packages much faster than Conda, so it is a good
112
+
option when the required package list is long. Enable this feature by adding the `--mamba`
113
+
flag.
114
+
115
+
```bash
106
116
conda-containerize new --mamba --prefix <install_dir> env.yml
107
117
```
108
118
119
+
### End-to-end example
109
120
110
-
### End-to-end example
121
+
Create a new Conda-based installation using the previous `env.yml` file.
111
122
112
-
Create new conda based installation using the previous `env.yml` file.
113
-
```
123
+
```bash
114
124
mkdir MyEnv
115
-
conda-containerize new --prefix MyEnv env.yml
125
+
conda-containerize new --prefix MyEnv env.yml
116
126
```
117
-
After the installation finishes we can add the installation directory to our PATH
127
+
128
+
After the installation finishes, add the installation directory to your `PATH`
118
129
and use it like normal.
119
130
120
131
```bash
@@ -130,74 +141,104 @@ Type "help", "copyright", "credits" or "license" for more information.
130
141
>>>
131
142
```
132
143
133
-
### Modifying a conda installation
144
+
### Modifying a Conda installation
134
145
135
-
Tykky installed software resides in a container, so it can not be directly modified.
136
-
Small Python packages can be added normally using `pip`, but then the Python packages are
137
-
sitting on the parallel filesystem so this is not recommended for any larger installations.
146
+
Tykky installations reside in a container, so they can not be directly modified.
147
+
Small Python packages can be added normally using `pip`, but then the Python packages
148
+
will be sitting on the parallel file system, which is not recommended for any larger
149
+
installations.
138
150
139
-
To actually modify the installation we can use the `update` keyword
140
-
together with the `--post-install <file>` option which specifies a bash script
141
-
with commands to run to update the installation. The commands are executed
142
-
with the conda environment activated.
151
+
To actually modify the installation, we can use the `update` keyword together with
152
+
the `--post-install <file>` option, which specifies a bash script with commands to
153
+
run to update the installation. The commands are executed with the Conda environment
*`<container>` can be a local filepath or any [URL accepted by singularity](https://docs.sylabs.io/guides/3.7/user-guide/cli/singularity_pull.html) (e.g `docker://``oras://` )
191
-
*`-w` needs to be an absolute path (or comma separated list) inside the container. Wrappers will then be automatically
192
-
created for the executables in the target directories / for the target path. If you do not know the path of executables in the container, open a shell inside the container and use [which command](https://linuxize.com/post/linux-which-command/). To open shell:
193
-
* In case of existing local Apptainer/Singularity file: `singularity shell xxx.sif`.
194
-
* In case of Docker or non-local Apptainer/Singularity file, create first the installation with some path and then start with created `_debug_shell`.
206
+
- `<container>`can be a local filepath or any [URL accepted by
0 commit comments