-
Notifications
You must be signed in to change notification settings - Fork 2
Setup
The following setup instructions have been designed and tested on Mac and Linux. It should work on recent versions of Windows as well, provided that conda and Docker are installed, as well as WSL.
If you wish to run ark
standalone (outside of a container), we recommend using a conda environment.
- Install
git clone https://github.com/reginabarzilaygroup/ark.git
cd ark
conda env create -f environment.yml
pip install .
- Start the server
ark-run-empty
You should see a message indicating that a server has started, including a line like this:
Listening at: http://0.0.0.0:5000
In a separate command prompt, run:
curl http://localhost:5000/info
This should return a response like:
{
"data": {
"apiVersion": "0.2.0",
"modelName": "empty",
"modelVersion": "0.2.0"
},
"message": null,
"statusCode": 200
}
You can also test access from a different computer on the same network, although in this case the local IP must be used.
curl http://${HOST_IP}:5000
This "empty" configuration doesn't serve any model, and if images are submitted will simply return an empty prediction. It is intended for testing.
To actually serve the Mirai model, install it alongside with ark:
# Install ark with Mirai
git clone https://github.com/reginabarzilaygroup/ark.git
cd ark
conda env create -f environment.yml
pip install ".[mirai]"
# Launch
ark-run-mirai
For sybil the process is the same, just replace "mirai" with "sybil". Note that the two models should not be installed in the same environment as they have different dependencies.
git clone https://github.com/reginabarzilaygroup/ark.git
cd ark
conda env create -f environment.yml
# Install ark with Sybil
pip install ".[sybil]"
# Launch
ark-run-sybil
To build a basic Docker container:
docker build -f docker/empty.Dockerfile -t ark_empty .
This container would run the server with the "empty" config.
To run the published docker image:
docker run --rm -d -p 5000:5000 ark_empty
After starting the container, you can test that it has launched with the following command:
curl http://localhost:5000/info
Building the Docker images for Mirai or Sybil follows a similar process.
docker build -f docker/mirai.Dockerfile -t mirai .
docker build -f docker/sybil.Dockerfile -t sybil .
Runtime configuration is done through environment variables. If running in a Docker container, these can be set on the command line or through an env file. In Docker Desktop, they can be set under Optional Settings -> Environment Variables.
Default "false". Set to "true" to have Ark save the scores of every series processed. These can be downloaded with links on the home page (shown if ARK_SAVE_SCORES=true).
since version 0.7.0
Default 4. Number of threads to use for CPU processing. Performance may improve somewhat if this is increased to the number of CPU cores on the machine.