-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: clean up Makefile * chore: update poetry env * chore: add devcontainer for CUDA version * docs: add dev environment notes * build: edit devcontainer environment * docs: add notes tab to site * ci: remove quarto ci/cd * ci: add poetry --with cpu key * chore: Update poetry install command to include dev dependencies
- Loading branch information
Showing
12 changed files
with
1,681 additions
and
1,361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "moll-cuda", | ||
"dockerFile": "../Dockerfile.devcontainer", | ||
"context": "../", | ||
"remoteUser": "moll", | ||
"runArgs": [ | ||
"--gpus=all" | ||
], | ||
"customizations": { | ||
"vscode": {}, | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash", | ||
"editor.tabSize": 4 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.pytest_cache/ | ||
.ruff_cache/ | ||
.venv/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM mcr.microsoft.com/devcontainers/python:3.10 as base | ||
|
||
ARG PROJECT_NAME=moll | ||
ARG USER_NAME=$PROJECT_NAME | ||
ARG SHELL=/bin/bash | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
RUN userdel -r vscode \ | ||
&& groupadd --gid $USER_GID $USER_NAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID --shell $SHELL --create-home $USER_NAME \ | ||
&& echo $USER_NAME ALL=\(ALL\) NOPASSWD: ALL >> /etc/sudoers \ | ||
&& pipx install poetry \ | ||
&& apt-get install -y sudo | ||
|
||
USER $USER_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Development Environment | ||
|
||
## Requirements | ||
|
||
- **JAX** is required to run the code. | ||
- **Poetry** is used for dependency management. | ||
- **NVIDIA Driver** and **NVIDIA Container Toolkit** are required for the CUDA version. | ||
|
||
|
||
|
||
## Installation | ||
|
||
### CPU Version | ||
|
||
To install the CPU-only development environment, run the following command: | ||
|
||
```bash | ||
poetry install --with cpu,dev | ||
``` | ||
|
||
### CUDA Version | ||
|
||
1. Ensure the NVIDIA Driver is installed on your machine. | ||
2. Install Docker and NVIDIA Container Toolkit. | ||
3. Run the following command to install the GPU-supported development environment: | ||
|
||
```bash | ||
poetry install --with cuda,dev | ||
``` | ||
|
||
### Manual JAX Installation | ||
|
||
To use the local JAX installation, install without specifying additional dependencies: | ||
|
||
```bash | ||
poetry install --with dev | ||
``` | ||
|
||
|
||
|
||
## Docker Container for Development | ||
|
||
Optionally, you can run the development environment in a Docker container. Configuration files are `.devcontainer/*` and `Dockerfile.devcontainer`. | ||
|
||
### CPU Version | ||
|
||
To install the CPU version, run inside the devcontainer: | ||
|
||
```bash | ||
poetry install --with cpu,dev | ||
``` | ||
|
||
### GPU Version | ||
|
||
Install NVIDIA Container Toolkit and run the devcontainer. Then, run the following command: | ||
|
||
```bash | ||
poetry install --with cuda,dev | ||
``` | ||
|
||
|
||
|
||
## Running Tests | ||
|
||
To run the tests, use: | ||
|
||
```bash | ||
poetry run pytest | ||
``` | ||
|
||
|
||
|
||
## Building Documentation | ||
|
||
1. Install documentation-specific dependencies: | ||
|
||
```bash | ||
poetry install --with docs | ||
``` | ||
|
||
2. Build the documentation: | ||
|
||
```bash | ||
make docs | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.