diff --git a/.github/workflows/python_ci.yaml b/.github/workflows/python_ci.yaml index e8c6def..645e7f8 100644 --- a/.github/workflows/python_ci.yaml +++ b/.github/workflows/python_ci.yaml @@ -23,8 +23,5 @@ jobs: . .venv/bin/activate echo PATH=$PATH >> $GITHUB_ENV - - name: Install dependencies - run: uv pip install -r requirements.txt - - name: Run pre-commit hooks run: pre-commit run --all-files --show-diff-on-failure diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5dd9174..f0a6bff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,8 @@ repos: hooks: - id: mypy-hello-world name: mypy hello-world - entry: mypy --strict + entry: | + bash -c 'test -d projects/hello-world/container/.venv || python -m venv projects/hello-world/container/.venv && projects/hello-world/container/.venv/bin/pip install -r projects/hello-world/container/requirements.txt && projects/hello-world/container/.venv/bin/mypy --strict' files: ^projects/hello-world/container/ language: system types: [python] @@ -23,7 +24,8 @@ repos: hooks: - id: mypy-torch-iris name: mypy torch-iris - entry: mypy --strict + entry: | + bash -c 'test -d projects/torch-iris/container/.venv || python -m venv projects/torch-iris/container/.venv && projects/torch-iris/container/.venv/bin/pip install -r projects/torch-iris/container/requirements.txt && projects/torch-iris/container/.venv/bin/mypy --strict' files: ^projects/torch-iris/container/ language: system types: [python] @@ -32,18 +34,19 @@ repos: hooks: - id: mypy-onnx-iris name: mypy onnx-iris - entry: mypy --strict + entry: | + bash -c 'test -d projects/onnx-iris/container/.venv || python -m venv projects/onnx-iris/container/.venv && projects/onnx-iris/container/.venv/bin/pip install -r projects/onnx-iris/container/requirements.txt && projects/onnx-iris/container/.venv/bin/mypy --strict' files: ^projects/onnx-iris/container/ language: system types: [python] - - repo: local hooks: - id: mypy-tgi-llm-container name: mypy tgi-llm container - entry: mypy --strict - files: ^projects/tgi-llm/container + entry: | + bash -c 'test -d projects/tgi-llm/container/.venv || python -m venv projects/tgi-llm/container/.venv && projects/tgi-llm/container/.venv/bin/pip install -r projects/tgi-llm/container/requirements.txt && projects/tgi-llm/container/.venv/bin/mypy --strict' + files: ^projects/tgi-llm/container/ language: system types: [python] @@ -51,8 +54,9 @@ repos: hooks: - id: mypy-tgi-llm-ui name: mypy tgi-llm ui - entry: mypy --strict - files: ^projects/tgi-llm/ui + entry: | + bash -c 'test -d projects/tgi-llm/ui/.venv || python -m venv projects/tgi-llm/ui/.venv && projects/tgi-llm/ui/.venv/bin/pip install -r projects/tgi-llm/ui/requirements.txt && projects/tgi-llm/ui/.venv/bin/mypy --strict' + files: ^projects/tgi-llm/ui/ language: system types: [python] @@ -60,8 +64,9 @@ repos: hooks: - id: mypy-gpt4 name: mypy gpt4 - entry: mypy --strict - files: ^projects/gpt4/container + entry: | + bash -c 'test -d projects/gpt4/container/.venv || python -m venv projects/gpt4/container/.venv && projects/gpt4/container/.venv/bin/pip install -r projects/gpt4/container/requirements.txt && projects/gpt4/container/.venv/bin/mypy --strict' + files: ^projects/gpt4/container/ language: system types: [python] @@ -69,8 +74,9 @@ repos: hooks: - id: mypy-prompt-to-nft name: mypy prompt-to-nft - entry: mypy --strict - files: ^projects/prompt-to-nft/container + entry: | + bash -c 'test -d projects/prompt-to-nft/container/.venv || python -m venv projects/prompt-to-nft/container/.venv && projects/prompt-to-nft/container/.venv/bin/pip install -r projects/prompt-to-nft/container/requirements.txt && projects/prompt-to-nft/container/.venv/bin/mypy --strict' + files: ^projects/prompt-to-nft/container/ language: system types: [python] diff --git a/projects/gpt4/container/Dockerfile b/projects/gpt4/container/Dockerfile index 92d4f77..603e559 100644 --- a/projects/gpt4/container/Dockerfile +++ b/projects/gpt4/container/Dockerfile @@ -18,7 +18,7 @@ ADD https://astral.sh/uv/install.sh /install.sh RUN chmod 755 /install.sh RUN /install.sh && rm /install.sh -COPY src/requirements.txt . +COPY requirements.txt . RUN /root/.cargo/bin/uv pip install --system --no-cache -r requirements.txt diff --git a/projects/gpt4/container/src/requirements.txt b/projects/gpt4/container/requirements.txt similarity index 100% rename from projects/gpt4/container/src/requirements.txt rename to projects/gpt4/container/requirements.txt diff --git a/projects/hello-world/container/Dockerfile b/projects/hello-world/container/Dockerfile index d4deb01..6ec5f64 100644 --- a/projects/hello-world/container/Dockerfile +++ b/projects/hello-world/container/Dockerfile @@ -18,7 +18,7 @@ ADD https://astral.sh/uv/install.sh /install.sh RUN chmod 755 /install.sh RUN /install.sh && rm /install.sh -COPY src/requirements.txt . +COPY requirements.txt . RUN /root/.cargo/bin/uv pip install --system --no-cache -r requirements.txt diff --git a/projects/hello-world/container/README.md b/projects/hello-world/container/README.md index e1517c5..d5e3589 100644 --- a/projects/hello-world/container/README.md +++ b/projects/hello-world/container/README.md @@ -71,7 +71,7 @@ WORKDIR /app RUN apt-get update -COPY src/requirements.txt . +COPY requirements.txt . RUN pip install --upgrade pip && pip install -r requirements.txt diff --git a/projects/hello-world/container/src/requirements.txt b/projects/hello-world/container/requirements.txt similarity index 100% rename from projects/hello-world/container/src/requirements.txt rename to projects/hello-world/container/requirements.txt diff --git a/projects/onnx-iris/container/Dockerfile b/projects/onnx-iris/container/Dockerfile index 92d4f77..603e559 100644 --- a/projects/onnx-iris/container/Dockerfile +++ b/projects/onnx-iris/container/Dockerfile @@ -18,7 +18,7 @@ ADD https://astral.sh/uv/install.sh /install.sh RUN chmod 755 /install.sh RUN /install.sh && rm /install.sh -COPY src/requirements.txt . +COPY requirements.txt . RUN /root/.cargo/bin/uv pip install --system --no-cache -r requirements.txt diff --git a/projects/onnx-iris/container/src/requirements.txt b/projects/onnx-iris/container/requirements.txt similarity index 100% rename from projects/onnx-iris/container/src/requirements.txt rename to projects/onnx-iris/container/requirements.txt diff --git a/projects/prompt-to-nft/container/Dockerfile b/projects/prompt-to-nft/container/Dockerfile index a0c9fe0..2e28cab 100644 --- a/projects/prompt-to-nft/container/Dockerfile +++ b/projects/prompt-to-nft/container/Dockerfile @@ -18,7 +18,7 @@ ADD https://astral.sh/uv/install.sh /install.sh RUN chmod 755 /install.sh RUN /install.sh && rm /install.sh -COPY src/requirements.txt . +COPY requirements.txt . RUN /root/.cargo/bin/uv pip install --system --no-cache -r requirements.txt diff --git a/projects/prompt-to-nft/container/src/requirements.txt b/projects/prompt-to-nft/container/requirements.txt similarity index 100% rename from projects/prompt-to-nft/container/src/requirements.txt rename to projects/prompt-to-nft/container/requirements.txt diff --git a/projects/prompt-to-nft/stablediffusion/Dockerfile b/projects/prompt-to-nft/stablediffusion/Dockerfile index 2e2852b..f682139 100644 --- a/projects/prompt-to-nft/stablediffusion/Dockerfile +++ b/projects/prompt-to-nft/stablediffusion/Dockerfile @@ -18,7 +18,7 @@ ADD https://astral.sh/uv/install.sh /install.sh RUN chmod 755 /install.sh RUN /install.sh && rm /install.sh -COPY src/requirements.txt . +COPY requirements.txt . RUN /root/.cargo/bin/uv pip install --system --no-cache -r requirements.txt diff --git a/projects/prompt-to-nft/stablediffusion/src/requirements.txt b/projects/prompt-to-nft/stablediffusion/requirements.txt similarity index 100% rename from projects/prompt-to-nft/stablediffusion/src/requirements.txt rename to projects/prompt-to-nft/stablediffusion/requirements.txt diff --git a/projects/tgi-llm/container/Dockerfile b/projects/tgi-llm/container/Dockerfile index 92d4f77..603e559 100644 --- a/projects/tgi-llm/container/Dockerfile +++ b/projects/tgi-llm/container/Dockerfile @@ -18,7 +18,7 @@ ADD https://astral.sh/uv/install.sh /install.sh RUN chmod 755 /install.sh RUN /install.sh && rm /install.sh -COPY src/requirements.txt . +COPY requirements.txt . RUN /root/.cargo/bin/uv pip install --system --no-cache -r requirements.txt diff --git a/projects/tgi-llm/container/src/requirements.txt b/projects/tgi-llm/container/requirements.txt similarity index 100% rename from projects/tgi-llm/container/src/requirements.txt rename to projects/tgi-llm/container/requirements.txt diff --git a/projects/tgi-llm/ui/Dockerfile b/projects/tgi-llm/ui/Dockerfile index 87f1d6b..84a5332 100644 --- a/projects/tgi-llm/ui/Dockerfile +++ b/projects/tgi-llm/ui/Dockerfile @@ -12,7 +12,7 @@ WORKDIR /app RUN apt-get update -COPY src/requirements.txt . +COPY requirements.txt . RUN pip install --upgrade pip && pip install -r requirements.txt diff --git a/projects/tgi-llm/ui/src/requirements.txt b/projects/tgi-llm/ui/requirements.txt similarity index 100% rename from projects/tgi-llm/ui/src/requirements.txt rename to projects/tgi-llm/ui/requirements.txt diff --git a/projects/torch-iris/container/Dockerfile b/projects/torch-iris/container/Dockerfile index 92d4f77..603e559 100644 --- a/projects/torch-iris/container/Dockerfile +++ b/projects/torch-iris/container/Dockerfile @@ -18,7 +18,7 @@ ADD https://astral.sh/uv/install.sh /install.sh RUN chmod 755 /install.sh RUN /install.sh && rm /install.sh -COPY src/requirements.txt . +COPY requirements.txt . RUN /root/.cargo/bin/uv pip install --system --no-cache -r requirements.txt diff --git a/projects/torch-iris/container/src/requirements.txt b/projects/torch-iris/container/requirements.txt similarity index 100% rename from projects/torch-iris/container/src/requirements.txt rename to projects/torch-iris/container/requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index fbbdac4..0000000 --- a/requirements.txt +++ /dev/null @@ -1,22 +0,0 @@ -gunicorn==22.0.0 -mypy==1.8.0 -mypy-extensions==1.0.0 -packaging==23.2 -requests==2.32.3 -ruff==0.1.13 -types-click==7.1.8 -types-Flask==1.1.6 -types-Jinja2==2.11.9 -types-MarkupSafe==1.1.10 -types-requests==2.31.0.20240125 -types-Werkzeug==1.0.9 -typing_extensions==4.9.0 -Flask==3.0.0 -quart==0.19.4 -torch==2.2.1 -web3==6.15.0 -onnx==1.16.1 -onnxruntime==1.17.1 -pre-commit==2.15.0 -python-dotenv==1.0.0 -ritual-arweave==0.1.0