proteinpaint-container 2.11.3
Install from the command line:
Learn more about npm packages
$ npm install @stjude/proteinpaint-container@2.11.3
Install via package.json:
"@stjude/proteinpaint-container": "2.11.3"
About this version
This distribution creates a Docker image with all of the system requirements for running the Proteinpaint application.
NOTE: The reference data files will still need to be downloaded.
TODO:
- automate or simplify reference data download
- make PP reference data available as an online API, so that there will not be a need to download really large reference data files. Only when there are performance and reliability concerns will local copies of reference data be desirable.
All installation options require a Docker Engine or Desktop.
There are 3 options to obtain a Docker image:
To test, make sure that your current working directory has
-
a serverconfig.json, which has a "URL": "http://localhost:[PORT]" entry (default PORT=3456, can be set to any valid, non-conflicting numeric port value)
-
an optional dataset folder, containing js files of any serverconfig.genomes.datasets[] entry that is not already included in proteinpaint/server/dataset
Based on the installation option that you chose, you can either use:
-
./run.sh [IMAGE_NAME]
for the non-NPM installation -
npx proteinpaint-container [server | full]
if you used the NPM-installation option
Open your web browser to your serverconfig.URL entry. The following examples assume that serverconfig.URL=http://localhost:3456.
When running either a server-only or full app image, you can check:
When running a full app image, you can check:
- http://localhost:3456 should open the Proteinpaint landing page
- inspect logs with
docker logs pp
- ssh into the container with
docker exec -it pp
- stop the container with
docker stop pp
-
launch.js
will be called in the host machine, to launch a Docker process usingrun.sh
. -
app-full.js
orapp-server.js
will be copied into a build stage and called from within a Docker container, to fill-in missing serverconfig.json settings and optional public files, and to start theproteinpaint-server
.
Follow the Build from Source
section above to pack tarballs, build the Docker image, and start a container process.
If the container does not start, replace
CMD ["sh", "-c", "node app.js"]
in the Dockerfile with
CMD ["sleep", "3600"]
and then ssh to the container using docker exec -it pp bash
to inspect
node_modules, run commands that are giving the error, etc.
You may also place the CMD ["sleep", "3600"]
earlier in the Dockerfile
prior to a build step that emits an error, and then run the command from
that step within the container to debug.
Note that publishing to the registry should not be part of iterative testing/debugging. Instead, test the packing and Docker builds locally as much as possible before creating a versioned release. The only time that it is acceptable to publish for testing purposes is as related to verifying and debugging CI actions/workflows, but that should be done rarely and only using prerelase, prepatch, or other pre* version types, in order to avoid disrupting the published version sequence.
cd container
npm pack
cd dir/not/under/a/git/repo
npm install path/to/proteinpaint/container/stjude-proteinpaint-....tgz
# make sure you have serverconfig.json in this dir
npx proteinpaint-container
docker logs pp
# ssh to an active container to inspect
docker exec -it pp bash