Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into dev-why
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoyuWang141 committed Aug 1, 2023
2 parents 65f0194 + da11de1 commit 969530c
Show file tree
Hide file tree
Showing 19 changed files with 594 additions and 109 deletions.
44 changes: 44 additions & 0 deletions dev_env_builder.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{ nixpkgs
, system
, cudaSupport
}:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
config.cudaSupport = cudaSupport;
};
python = pkgs.python310;

common-dependencies = with python.pkgs; [
jax
jaxlib
optax
pyarrow
];

doc-dependencies = with python.pkgs; [
myst-parser
numpydoc
pydata-sphinx-theme
sphinx
sphinx-copybutton
sphinx-design
];

test-dependencies = with python.pkgs; [
pytest
chex
gym
ray
torchvision
];
in
pkgs.mkShell {
buildInputs = [
(python.withPackages
(ps: common-dependencies
++ test-dependencies
++ doc-dependencies))
];
}
12 changes: 5 additions & 7 deletions fhs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ in
stdenv
gcc

python39
python39Packages.pip
python39Packages.setuptools
python39Packages.wheel
python39Packages.virtualenv
python310
python310Packages.pip
python310Packages.setuptools
python310Packages.wheel
python310Packages.virtualenv

cudaPackages.cudatoolkit
cudaPackages.cudnn
Expand All @@ -32,6 +32,4 @@ in
SDL2
glfw
];

runScript = "fish";
}).env
42 changes: 30 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "evox";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:ogoid/nixpkgs/fixup-missing-cudnn";
utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
Expand All @@ -14,15 +14,17 @@
with nixpkgs.lib;
eachSystem (with system; [ x86_64-linux ]) (system:
let
generic-builder = import ./generic.nix;
with-cuda = generic-builder { inherit system nixpkgs; cudaSupport = true; };
cpu-only = generic-builder { inherit system nixpkgs; cudaSupport = false; };
total = recursiveUpdate with-cuda cpu-only;
builder = import ./dev_env_builder.nix;
cuda-env = builder { inherit system nixpkgs; cudaSupport = true; };
cpu-env = builder { inherit system nixpkgs; cudaSupport = false; };
in
recursiveUpdate total {
devShells.default = total.devShells.cpu;
packages.default = total.packages.cpu;
devShells.fhs = import ./fhs.nix { inherit nixpkgs system; cudaSupport=true; };
{
devShells.default = cpu-env;
devShells.cpu = cpu-env;
devShells.cuda = cuda-env;
devShells.fhs = import ./fhs.nix {
inherit nixpkgs system; cudaSupport=true;
};
}
);
}
72 changes: 0 additions & 72 deletions generic.nix

This file was deleted.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies = [
"jax >= 0.3.0",
"jaxlib >= 0.3.0",
"optax >= 0.1.0",
"pyarrow >= 10.0.0",
]

[project.optional-dependencies]
Expand Down
1 change: 1 addition & 0 deletions requirements/docs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
jax
jaxlib
optax
pyarrow
# for docs generation
pydata-sphinx-theme
sphinx < 6 # https://github.com/pydata/pydata-sphinx-theme/issues/1094
Expand Down
1 change: 1 addition & 0 deletions src/evox/algorithms/mo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
from .rvea import RVEA
from .moead import MOEAD
from .ibea import IBEA
from .nsga3 import NSGA3
Loading

0 comments on commit 969530c

Please sign in to comment.