Skip to content
Open
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
61 changes: 61 additions & 0 deletions flake.lock

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

54 changes: 54 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
description = "LakeBench dev environment";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
python = pkgs.python313;
in
{
devShells.default = pkgs.mkShell {
packages = [
python
pkgs.uv
pkgs.ruff
];

shellHook = ''
create-venv() {
rm -rf .venv
uv venv --python ${python}/bin/python .venv
source .venv/bin/activate

uv pip install -e .
# spark and sail conflict with each other, install separately
for extra in duckdb polars daft tpcds_datagen tpch_datagen sparkmeasure spark sail; do
uv pip install "lakebench[$extra]" 2>&1 || echo "warning: $extra failed to install, skipping"
done
uv pip install --group dev
uv pip install jupyter ipykernel
python -m ipykernel install --user --name python3 --display-name "Python 3 (LakeBench)"

# store hash to detect pyproject.toml changes
md5sum pyproject.toml > .venv/.pyproject.hash
}

if [ ! -d .venv ]; then
create-venv
elif ! md5sum --check .venv/.pyproject.hash &>/dev/null; then
echo "pyproject.toml changed, recreating venv..."
create-venv
else
source .venv/bin/activate
fi
'';
};
}
);
}