pyiron / FAQs

General question board for pyiron users
3 stars 0 forks source link

Create a custom conda environment on the cluster #1

Open samwaseda opened 1 year ago

samwaseda commented 1 year ago

This tutorial details how to create a custom conda environment on the cluster and use it for calculations:

jan-janssen commented 1 year ago

The NERSC computing center also has a nice how-to on this topic https://docs.nersc.gov/services/jupyter/how-to-guides/#how-to-use-a-container-to-run-a-jupyter-kernel

jan-janssen commented 10 months ago

Be careful, if the kernel.json file is wrongly formatted, no kernels are displayed in the Jupyter lab environment. Here is an example of a correctly formatted kernel.json file:

{
 "argv": [
  "/cmmc/ptmp/janj/mambaforge/bin/python",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ],
 "display_name": "janj",
 "language": "python",
 "metadata": {
  "debugger": true
 },
 "env": {
  "PATH": "/cmmc/ptmp/janj/mambaforge/bin:${PATH}",
  "CONDA_PREFIX": "/cmmc/ptmp/janj/mambaforge"
 }
}
srmnitc commented 9 months ago

Make sure to not have module load pyiron/dev in your bashrc. Instead do, module load pyiron/latest.

srmnitc commented 9 months ago

In case of errors such as:

InvalidArchiveError("Error with archive /cmmc/u/<username>/.conda/pkgs/python-3.11.8-hab00c5b_0_cpython/.cph_tmps783dxu6/pkg-python-3.11.8-hab00c5b_0_cpython.tar.zst.  You probably need to delete and re-download or re-create this file.  Message from libarchive was:\n\nCan't create 'lib/python3.11/lib2to3/fixes/__pycache__/fix_ne.cpython-311.pyc'")

Run conda clean --all and run the steps again.