Skip to content

Latest commit

 

History

History
108 lines (72 loc) · 4.4 KB

Docker-README.md

File metadata and controls

108 lines (72 loc) · 4.4 KB

README

This is the README for the CRI Kitchen Sandbox on Bitbucket/ Docker

Docker Important Steps

  • on linux (Ubuntu) add yourself to 'docker' group, e.g.
usermod -a -G docker $USER

then re-login to assure you are a member

  • The boot2docker-vm wants to have 8GB for compiling the alumae search graph, the best way to set this is via VirtualBox, when the machine is powered off (it should also work differently, but not for me, it seems)
  • How to connect audio?
  • How to enable login into VMs without password (and without requiring sharing key)?
  • You may run out of space in /var/lib/docker, when building these machines. On Ubuntu, only 9 GB or so of space is allocated to the /var partition; some of these VMs will use up over 8GB there, when built. To work around this, link /var/lib/docker symbolically to someplace with more space.
#!shell

#The parameter [-t] gives you the ability to name the image that is going to be created from the GitHub repository that contains the Dockerfile. In this case, the image will be called fmetze/docker-desktop
docker build --rm=true -t fmetze/docker-desktop git://github.com/rogaha/docker-desktop.git

#Run the docker image created
# -d: detached mode
# -P: expose all the ports to the host machine
# CONTAINER_ID contains the ID of the new running container created from the rogaha/docker-desktop image
CONTAINER_ID=$(docker run -d -v /Users/metze:/mnt -P fmetze/docker-desktop)

# Get the password generated during runtime
# A new password is generated by PWGen every time that a container is created. The password contains 12 characters with at least one capital letter and one number.
echo $(docker logs $CONTAINER_ID | sed -n 1p)
User: docker Password: eequ4IuRi0si

# We'll need the IP of the machine where docker is running
boot2docker ip
192.168.59.103

# Get the container’s external ssh port
# We are going to use this port later to connect to the machine where docker daemon is running
docker port $CONTAINER_ID 22
0.0.0.0:2376

docker ps
… NUM XXX …
docker exec -t -i $CONTAINER_ID bash -c "su docker"
ssh -o StrictHostKeyChecking=no -X docker@`boot2docker ip` -p `docker port $CONTAINER_ID 22|cut -d ":" -f 2` xterm
docker stop XXX
docker commit NUM ubuntu-kaldi
NUMNUM

# this seems pretty cool to reduce the memory footprint: [http://jasonwilder.com/blog/2014/08/19/squashing-docker-images/](http://jasonwilder.com/blog/2014/08/19/squashing-docker-images/)

Git tips:

"git push" is more like 3 steps:

  1. git add
  2. git commit
  3. git push

To update a brand new Git repo with a tree of pre-existing code:

  1. git clone https://github.com/your-git-username/new-empty-repo-name.git
  2. copy the code into the current working directory

  3. git push origin master

Useful equivalent to "svn up":

  • git reset --hard origin/master

Vagrant tips

To automatically update Virtualbox guest additions, install:

https://github.com/dotless-de/vagrant-vbguest

live-decode

See http://blog.docker.com/2013/07/docker-desktop-your-desktop-over-ssh-running-inside-of-a-docker-container/

This is an installation of Kaldi in a Docker container

offline-transcriber

This is an installation of Tanel Alumaes kaldi-offline-transcriber in a Docker container, using the live-decode one

swbd-transcriber

This transcribes telephony conversations, using the offline-transcriber.

You might get an error: https://bitbucket.org/fmetze/kitchen-sandbox/wiki/swbd-transcriber%20error

Pointers

Who do I talk to?