Skip to content
Snippets Groups Projects
Commit 782b17ec authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[pre-commit] Update and add further rules; clean-up

parent 97b746bd
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
*~ *~
*.swp *.swp
*.pyc *.pyc
*.egg-info
.nfs* .nfs*
.coverage* .coverage*
*.DS_Store *.DS_Store
...@@ -14,15 +13,12 @@ coverage.xml ...@@ -14,15 +13,12 @@ coverage.xml
test_results.xml test_results.xml
junit-coverage.xml junit-coverage.xml
html/ html/
build/
doc/api/ doc/api/
dist/ dist/
cache/ cache/
_citools/
_work/
.mypy_cache/ .mypy_cache/
.pytest_cache/ .pytest_cache/
results*/
*_version.py *_version.py
.venv .venv
.pixi .pixi
results*/
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# See https://pre-commit.com/hooks.html for more hooks # See https://pre-commit.com/hooks.html for more hooks
repos: repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.2 rev: v0.4.3
hooks: hooks:
- id: ruff - id: ruff
args: [ --fix ] args: [ --fix ]
...@@ -20,11 +20,11 @@ repos: ...@@ -20,11 +20,11 @@ repos:
hooks: hooks:
- id: mypy - id: mypy
args: [ --install-types, --non-interactive, --no-strict-optional, --ignore-missing-imports ] args: [ --install-types, --non-interactive, --no-strict-optional, --ignore-missing-imports ]
# - repo: https://github.com/pre-commit/mirrors-prettier - repo: https://github.com/AleksaC/hadolint-py
# rev: v2.7.1 rev: v2.12.1b3
# hooks: hooks:
# - id: prettier - id: hadolint
# types_or: [json] args: [--ignore, DL3007, --ignore, DL3008]
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 rev: v4.6.0
hooks: hooks:
...@@ -42,7 +42,6 @@ repos: ...@@ -42,7 +42,6 @@ repos:
- id: check-yaml - id: check-yaml
exclude: | exclude: |
(?x)( (?x)(
^conda/meta.yaml|
^.gitlab-ci.yml ^.gitlab-ci.yml
) )
- id: debug-statements - id: debug-statements
...@@ -57,6 +56,5 @@ repos: ...@@ -57,6 +56,5 @@ repos:
exclude: | exclude: |
(?x)( (?x)(
^.pixi/| ^.pixi/|
^.pixi.toml/| ^.pixi.lock|
^.pixi.lock/|
) )
...@@ -6,17 +6,17 @@ COPY pyproject.toml pixi.lock /app/ ...@@ -6,17 +6,17 @@ COPY pyproject.toml pixi.lock /app/
WORKDIR /app WORKDIR /app
RUN pixi install --frozen -e cuda-base RUN pixi install --frozen -e cuda-base
COPY dist/*.whl /app/ COPY dist/*.whl /app/
RUN /app/.pixi/envs/cuda-base/bin/pip install --no-dependencies --no-build-isolation mednet-*.whl RUN /app/.pixi/envs/cuda-base/bin/pip install --no-dependencies --no-build-isolation mednet-*.whl \
RUN pixi shell-hook --frozen -e cuda-base > /entrypoint.sh && pixi shell-hook --frozen -e cuda-base > /entrypoint.sh \
RUN echo "mednet" >> /entrypoint.sh && echo "mednet" >> /entrypoint.sh
FROM nvidia/cuda:12.3.1-runtime-ubuntu22.04 AS production FROM nvidia/cuda:12.3.1-runtime-ubuntu22.04 AS production
# only copy the production environment into prod container # only copy the production environment into prod container
COPY --from=build /app/.pixi/envs/cuda-base /app/.pixi/envs/cuda-base COPY --from=build /app/.pixi/envs/cuda-base /app/.pixi/envs/cuda-base
COPY --from=build /entrypoint.sh /entrypoint.sh COPY --from=build /entrypoint.sh /entrypoint.sh
RUN apt update \ RUN apt-get update \
&& apt install -y libopengl0 libegl1 libgl1-mesa-glx > /dev/null \ && apt-get install --no-install-recommends -y libopengl0 libegl1 libgl1-mesa-glx > /dev/null \
&& apt-get clean && apt-get autoclean && apt-get autoremove \ && apt-get clean && apt-get autoclean && apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
WORKDIR /app WORKDIR /app
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment