a FAST API REST service about an embedded chrs application -- basically a web-based chrs
pfchrs
is a FastAPI application thought experiment that provides REST services about an "embedded" chrs
client. This repo is part of an experiment into examining the feasibility of offering chrs
via web to a bundled ChRIS ecosystem instantiation.
A fuller experience closer to the imagined goal is to use the chrs_web interface that provides an interactive "terminal", sends commands to pfchrs
and renders results.
To build a local version, clone this repo and then
set UID=$(id -u) # for bash/zsh
set UID (id -u) # for fish shell
docker build --build-arg UID=UID -t local/pfchrs .
To use the version available on dockerhub (note, might not be available at time of reading):
docker pull fnndsc/pfchrs
To start the services
SESSIONUSER=localuser
docker run \
--env SESSIONUSER=$SESSIONUSER \
--name pfchrs --rm -it -d \
-p 2025:2025 \
local/pfchrs /start-reload.sh
To start with source code debugging and live refreshing:
SESSIONUSER=localuser
docker run \
--env SESSIONUSER=$SESSIONUSER \
--name pfchrs --rm -it -d \
-p 2025:2025 \
-v $PWD/pfchrs:/app:ro
local/pfchrs /start-reload.sh
(note if you pulled from dockerhub, use fnndsc/pfchrs
instead of local/pfchrs
)
pfchrs
provides a POST endpoint that accepts a command to execute internally. A "vault" is used to provide credentialling to a connected CUBE.
POST :2025/api/v1/chrs/{cmd}
-30-