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
25 changes: 3 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,14 @@
# basic python3 image as base
FROM continuumio/miniconda3
FROM harbor2.vantage6.ai/infrastructure/algorithm-base:5.0

# This is a placeholder that should be overloaded by invoking
# docker build with '--build-arg PKG_NAME=...'
ARG PKG_NAME="v6_diagnostics"
ENV PKG_NAME=${PKG_NAME}

ENV PATH="/opt/conda/envs/py310/bin/:${PATH}"


EXPOSE 8888
LABEL p8888="port8"

EXPOSE 5555
LABEL p5555="port5"

# install federated algorithm
COPY . /app

RUN apt update

RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
RUN dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb

RUN conda create -n py310 python=3.10

RUN pip install /app



# Tell docker to execute `docker_wrapper()` when the image is run.
# Tell docker to execute `wrap_algorithm()` when the image is run. This function
# will ensure that the algorithm method is called properly.
CMD python -c "from vantage6.algorithm.tools.wrap import wrap_algorithm; wrap_algorithm()"
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
IMAGE_NAME := "harbor2.vantage6.ai/algorithms/diagnostic"
IMAGE_NAME := harbor2.vantage6.ai/algorithms/diagnostic
TAG := uluru

help:
@echo "publish - build and push docker image to registry"
Expand All @@ -7,9 +8,8 @@ help:
@echo "help - show this help message and exit"

publish: image push

image:
docker build -t $(IMAGE_NAME) .
docker build -t $(IMAGE_NAME):$(TAG) .

push:
docker push $(IMAGE_NAME)
docker push $(IMAGE_NAME):$(TAG)
26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,17 @@ pip install .
```

### Execute
```bash
vtest run-test-algorithm --host http://localhost --port 5000 --username *** \
--password *** --collaboration 1 [--online-only] [--organization 1] \
[--organization N]
```

Follow instructions in the CLI:

```bash
python -i v6_diagnostic/cli.py [host] [port] [path] [username] [password]
v6 test --help
```

````python
>>> from vantage6.client import Client
>>> client = Client('http://localhost', 5000, '***', '***')
>>> from v6_diagnostics.cli import DiagnosticRunner
>>> runner = DiagnosticRunner(client, collaboration_id, organizations,
... online_only)
>>> runner()
````
See the [vantage6 documentation](https://docs.vantage6.ai/) for more information on how
to use the CLI.

## Build

### Package
```bash
python setup.py sdist bdist_wheel
```
The ``v6 test integration-test`` command and ``v6 test feature-test`` command will run this algorithm.

### Docker image
```bash
Expand Down
128 changes: 0 additions & 128 deletions cli/diagnostic_runner.py

This file was deleted.

117 changes: 0 additions & 117 deletions cli/test.py

This file was deleted.

28 changes: 28 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "v6-diagnostics"
version = "1.0.0"
description = "vantage6 node diagnostic tools"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"vantage6-algorithm-tools>=5.0.0a43",
"vantage6-client>=5.0.0a43",
"requests",
"pyjwt",
"rich",
"click",
]
license = { text = "Apache License 2.0" }
keywords = ["vantage6", "algorithm", "diagnostics"]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.13",
]

[tool.hatch.build.targets.wheel]
packages = ["v6_diagnostics"]
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

Loading