diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml index 8aabe3760..698fdb368 100644 --- a/.github/workflows/test-build.yaml +++ b/.github/workflows/test-build.yaml @@ -13,7 +13,6 @@ jobs: fail-fast: false matrix: python-version: ["3.8", "3.10"] - requirements-file: ["pt2", "pt13"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -23,5 +22,5 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements/${{ matrix.requirements-file }}.txt - pip install . \ No newline at end of file + pip install -r requirements.txt + pip install . diff --git a/.gitignore b/.gitignore index 5506c38d8..4abb5b6e8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,12 +3,11 @@ *.py[cod] # envs -.pt13 -.pt2 +.venv # directories /checkpoints /dist /outputs /build -/src \ No newline at end of file +/src diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..63611d991 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +# Contains helpful make targets for development + +.venv: requirements.txt ## Create a virtual environment and install dependencies + python3 -m venv --clear .venv + .venv/bin/pip install -r requirements.txt + +.PHONY: clean +clean: ## Remove the virtual environment + @rm -rf .venv diff --git a/README.md b/README.md index 61fa687b8..ad4afced2 100644 --- a/README.md +++ b/README.md @@ -99,9 +99,9 @@ This is assuming you have navigated to the `generative-models` root after clonin ```shell # install required packages from pypi -python3 -m venv .pt2 -source .pt2/bin/activate -pip3 install -r requirements/pt2.txt +python3 -m venv .venv +source .venv/bin/activate +pip3 install -r requirements.txt ``` #### 3. Install `sgm` diff --git a/pyproject.toml b/pyproject.toml index 2cc502168..89c38d1e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,6 +43,6 @@ dependencies = [ [tool.hatch.envs.ci.scripts] test-inference = [ "pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 --index-url https://download.pytorch.org/whl/cu118", - "pip install -r requirements/pt2.txt", + "pip install -r requirements.txt", "pytest -v tests/inference/test_inference.py {args}", ] diff --git a/requirements/pt2.txt b/requirements.txt similarity index 100% rename from requirements/pt2.txt rename to requirements.txt