mbari-org / lcm-websocket-server

WebSocket server for republishing LCM messages.
3 stars 0 forks source link

Dockerize #4

Closed carueda closed 1 year ago

carueda commented 1 year ago

Hi @kevinsbarnard –

Along with providing a dockerized version of compasswebui (already done), also offering lcm-websocket-server via docker would be a nice complement!

kevinsbarnard commented 1 year ago

Wrote a Dockerfile for lcm-websocket-server on the docker-compas branch. See the README for details on building & running.

kevinsbarnard commented 1 year ago

Note that the image is specific to the compas_lcmtypes package. I'm thinking through a better way to keep the image generic to the actual LCM Python type packages to be used. Once I can get that figured out, I'll refactor and merge into main, and push the image to Docker Hub.

carueda commented 1 year ago

Thanks @kevinsbarnard, great progress. Just took a quick look at the readme and dockerfile. Probably already under your consideration but some volume mapping may facilitate loading other python packages at run time that the user happens to have on their host.

kevinsbarnard commented 1 year ago

Thanks @carueda! That's a great suggestion, I was thinking about doing that too. I think that will be the most generic way to provide it.

kevinsbarnard commented 1 year ago

@carueda I've applied the suggestion above, so now the Docker image is general to any Python package. Python packages mounted under /app will be available to the app by default (i.e., /app is added to PYTHONPATH in the container default cmd). I've updated the README to reflect this change.

I am working with Kevin G. to get the proper permission for our Docker Hub then will push there. In the meantime if you want to test, you can build the image locally.

kevinsbarnard commented 1 year ago

Pushed (public): https://hub.docker.com/repository/docker/mbari/lcm-websocket-server Closing as completed.

carueda commented 1 year ago

Awesome, many thanks @kevinsbarnard!