-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from timechess/main
Use poetry and Nix
- Loading branch information
Showing
9 changed files
with
2,677 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/LatentDiffusion/data/__pycache__ | ||
**/__pycache__ | ||
*.pyc |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
inputs = { | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, flake-utils }: | ||
flake-utils.lib.eachDefaultSystem (system: | ||
let pkgs = nixpkgs.legacyPackages.${system}; | ||
in { devShells.default = import ./shell.nix { inherit pkgs system; }; }); | ||
} |
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[tool.poetry] | ||
name = "simplediffusion" | ||
version = "0.1.0" | ||
description = "" | ||
#authors = ["Your Name <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
package-mode = false | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9,<3.13" | ||
pytorch-lightning = "^1.8.3" | ||
torchmetrics = "^0.11.4" | ||
datasets = "^2.18.0" | ||
transformers = "4.30.2" | ||
diffusers = "^0.20.0" | ||
torch = { version = "2.0.1", source="torch"} | ||
torchvision = { version = "0.15.2", source="torch"} | ||
opencv-python = "^4.9.0.80" | ||
tensorboard = "^2.16.2" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[[tool.poetry.source]] | ||
name = "torch" | ||
url = "https://download.pytorch.org/whl/cu118/" | ||
priority = "supplemental" | ||
|
||
|
||
[[tool.poetry.source]] | ||
name = "mirrors" | ||
url = "https://pypi.tuna.tsinghua.edu.cn/simple/" | ||
priority = "primary" |
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,14 @@ | ||
{ pkgs, ... }: | ||
|
||
(pkgs.mkShell rec { | ||
|
||
buildInputs = (with pkgs; [ python39 poetry gcc gnumake zsh zlib libGL glib]); | ||
|
||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc]; | ||
|
||
shellHook = '' | ||
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath buildInputs}:$LD_LIBRARY_PATH" | ||
poetry env use ${pkgs.python39}/bin/python | ||
poetry install | ||
''; | ||
}) |