diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..c6e351918 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,12 @@ +FROM mambaorg/micromamba:1.5-focal-cuda-11.7.1 + +USER root + +RUN apt update && apt install -y git && apt clean + +USER $MAMBA_USER + +COPY --chown=$MAMBA_USER:$MAMBA_USER ./environment.yml /home/env.yaml + +RUN micromamba install -y -n base -f /home/env.yaml && \ + micromamba clean --all --yes diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..cc0451a51 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,31 @@ +{ + "name": "httomo", + "image": "gcr.io/diamond-pubreg/httomo/dev:0.0.1", + "workspaceMount": "src=${localWorkspaceFolder},dst=/httomo,type=bind", + "workspaceFolder": "/httomo", + // Please fill in: + // - `HTTOMOLIB_LOCAL_REPO` and `HTTOMOLIBGPU_LOCAL_REPO` with your local + // git repos of httomolib and httomolibgpu respectively + // - `LOCAL_OUT` with a directory that supports parallel I/O (any directory + // on a local drive will be sufficient) + "mounts": [ + "src=HTTOMOLIB_LOCAL_REPO,dst=/httomolib,type=bind", + "src=HTTOMOLIBGPU_LOCAL_REPO,dst=/httomolibgpu,type=bind", + "src=LOCAL_OUT,dst=/httomo/output_dir,type=bind", + ], + "containerUser": "root", + "securityOpt": [ "label=disable" ], + "postCreateCommand": "micromamba run -n base pip install -e /httomolib -e /httomolibgpu -e /httomo", + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-pyright.pyright", + "charliermarsh.ruff", + ] + } + }, + "settings": { + "python.analysis.typeCheckingMode": "strict", + } +} diff --git a/.devcontainer/environment.yml b/.devcontainer/environment.yml new file mode 100644 index 000000000..4d7ac3899 --- /dev/null +++ b/.devcontainer/environment.yml @@ -0,0 +1,22 @@ +name: httomo +channels: + - astra-toolbox + - conda-forge + - httomo + - anaconda +dependencies: + - astra-toolbox::astra-toolbox + - conda-forge::click>=8.1.3 + - conda-forge::cupy + - conda-forge::h5py=*=*mpi_mpich* + - conda-forge::hdf5plugin + - conda-forge::mpi4py + - conda-forge::pyyaml + - conda-forge::numpy<1.24 + - conda-forge::nvtx + - conda-forge::python + - conda-forge::plumbum + - anaconda::ipython + - conda-forge::tomopy + - httomo::larix + - httomo::tomobar