Skip to content

Add osx-arm64 platform to conda-lock.yml file and GitHub Actions CI #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.11"]
os: [ubuntu-22.04, macos-12]
os: [ubuntu-22.04, macos-12, macos-14]
defaults:
run:
shell: bash -l {0}
Expand All @@ -41,3 +41,5 @@ jobs:
run: |
micromamba install python=${{ matrix.python-version }} pytest
python -m pytest --verbose src/tests/
env:
PYTORCH_MPS_PREFER_METAL: 0 # disable MPS which runs out of memory on macos-14 runner
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ repos:
hooks:
- id: check-added-large-files
args: [ '--maxkb=512', '--enforce-all' ]
exclude: conda-lock.yml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
Expand Down
31 changes: 7 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ Launch into a [JupyterLab](https://jupyterlab.readthedocs.io) environment on
To help out with development, start by cloning this [repo-url](/../../)

git clone <repo-url>
cd model

Then we recommend [using mamba](https://mamba.readthedocs.io/en/latest/installation.html)
to install the dependencies.
A virtual environment will also be created with Python and
to install the dependencies. A virtual environment will also be created with Python and
[JupyterLab](https://github.com/jupyterlab/jupyterlab) installed.

cd model
mamba env create --file environment.yml

> [!NOTE]
> The command above will only work for Linux devices with CUDA GPUs. For installation
> on macOS devices (either Intel or ARM chips), follow the 'Advanced' section in
> https://clay-foundation.github.io/model/installation.html#advanced

Activate the virtual environment first.

mamba activate claymodel
Expand All @@ -40,27 +44,6 @@ Finally, double-check that the libraries have been installed.

mamba list

### Advanced

This is for those who want full reproducibility of the virtual environment.
Create a virtual environment with just Python and conda-lock installed first.

mamba create --name claymodel python=3.11 conda-lock=2.5.1
mamba activate claymodel

Generate a unified [`conda-lock.yml`](https://github.com/conda/conda-lock) file
based on the dependency specification in `environment.yml`. Use only when
creating a new `conda-lock.yml` file or refreshing an existing one.

conda-lock lock --mamba --file environment.yml --platform linux-64 --with-cuda=12.0

Installing/Updating a virtual environment from a lockile. Use this to sync your
dependencies to the exact versions in the `conda-lock.yml` file.

conda-lock install --mamba --name claymodel conda-lock.yml

See also https://conda.github.io/conda-lock/output/#unified-lockfile for more
usage details.

## Usage

Expand Down
Loading