ballaerospace / cosmos-docker Goto Github PK
View Code? Open in Web Editor NEWCOSMOS 4 Dockerfiles
License: GNU General Public License v3.0
COSMOS 4 Dockerfiles
License: GNU General Public License v3.0
I'm not sure there's something for this repo to fix or perhaps just update the documentation. I ran into an error trying to run the image per the commands in the readme file
Running Ubuntu 18.04.4 LTS
Command Input
docker run --net=host --rm -e DISPLAY -e QT_X11_NO_MITSHM=1 ballaerospace/cosmos
Command Result
No protocol specified
Launcher: cannot connect to X server :0
Fix
Fixed by entering this command on the command line and attempting again
xhost local:root
We are attempting to migrate our Cosmos configuration to a docker based environment. However there seems to be some internal variable that assumes the configuration is in the /cosmos directory. If I use another directory the command telemetry server works fine but all of the screens we have developed try to load from a /cosmos base. For now we are mounting our config at the /cosmos directory as a workaround.
# Based off of https://raw.githubusercontent.com/BallAerospace/cosmos-docker/master/ubuntu18.04/Dockerfile
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=America/Los_Angeles
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update -y && apt-get install -y \
cmake \
freeglut3 \
freeglut3-dev \
gcc \
g++ \
git \
iproute2 \
libffi-dev \
libgdbm-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer1.0-dev \
libncurses5-dev \
libreadline6-dev \
libssl-dev \
libyaml-dev \
net-tools \
vim \
zlib1g-dev \
software-properties-common
RUN add-apt-repository ppa:rock-core/qt4 && \
apt update && \
apt-get install -y \
qt4-default \
qt4-dev-tools
# libsmokeqt4-dev - not needed See https://github.com/BallAerospace/COSMOS/issues/1238
## RUBY 2.5 env setup using rvm
RUN gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && \
curl -sSL https://get.rvm.io | bash -s stable && \
/bin/bash -l -c "source /etc/profile.d/rvm.sh && rvm install 2.5"
## Finally install cosmos
ENV COSMOS_VERSION 4.5.2
RUN /bin/bash -l -c "\
rvm use 2.5 --default && \
gem install rake --no-document && \
gem install cosmos -v ${COSMOS_VERSION} --no-document"
Is it possible to connect to x11 server without using the --net=host argument? I've created my own sub network with docker network create and would like to run the cosmos image with:
docker run --net mynetwork --ip 172.18.0.30 -e DISPLAY -e QT_X11_NO_MITSHM=1 ballaerospace/cosmos
Hi Ryan,
I have a use case where we are developing against Cosmos, but not using cosmos's Gui. That said, I know that it is a gui tool.
For my current uses(verify that I have streamed in telemetry and sent commands to cosmos) I'm just using the API.
Also to automate starting the CmdTlmServer I just start it directly. Using the following command
./Cosmos/tools/CmdTlmServer &
When I try and run with the following docker-compose settings.
cosmos:
image: "ballaerospace/cosmos"
ports:
- 127.0.0.1:42430:42430 # File ingest telemetry port
- 127.0.0.1:7777:7777 # Command port
- 127.0.0.1:7779:7779 # Telemetry output port
#volumes:
#- /c/COSMOS/Demo:/cosmos
#- ./Cosmos:/cosmos
Launcher: cannot connect to X server
Or when I run with a custom configuration
cosmos:
image: "ballaerospace/cosmos"
ports:
- 127.0.0.1:42430:42430 # File ingest telemetry port
- 127.0.0.1:7777:7777 # Command port
- 127.0.0.1:7779:7779 # Telemetry output port
volumes:
- ./Cosmos:/cosmos
I get a different error.
sh: 1: zenity: not found
sh: 1: notify-send: not found
/var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/resolver.rb:290:in `block in verify_gemfile_dependencies_are_found!': Could not find gem 'ruby-termios (~> 0.9)' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/resolver.rb:258:in `each'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/resolver.rb:258:in `verify_gemfile_dependencies_are_found!'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/resolver.rb:49:in `start'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/resolver.rb:22:in `resolve'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/definition.rb:258:in `resolve'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/definition.rb:170:in `specs'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/definition.rb:237:in `specs_for'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/definition.rb:226:in `requested_specs'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:101:in `block in definition_method'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/runtime.rb:20:in `setup'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler.rb:149:in `setup'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/setup.rb:20:in `block in <top (required)>'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:136:in `with_level'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/ui/shell.rb:88:in `silence'
from /var/lib/gems/2.5.0/gems/bundler-2.1.4/lib/bundler/setup.rb:20:in `<top (required)>'
from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from /cosmos/tools/tool_launch.rb:14:in `tool_launch'
from Launcher:13:in `<main>'
I have ran Cosmos 5.0 and can see how this may not be worth the effort supporting it in 4.x.
Thanks,
(SDL)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.