Sign inSign up

corerain/cr-working-env

By corerain

•Updated over 7 years ago

A working environment for cr developers.

Image
0

664

corerain/cr-working-env repository overview

⁠Intro.

This is a Corerain working environment for daily development, testing and release for:

  1. librainmam
  2. raintime
  3. plumber

Since plumber may be used for cpu and gpu, two versions of this env will be provided for all time (i.e. tag cpu and tag gpu of the repo).

Dockerfile repo on Github: https://github.com/corerain/cr-working-env.git⁠

TAG latest is an old version only for back-up (though tagged latest), please use tags cpu and gpu.

⁠Getting started
  • Pull the cpu image
docker pull corerain/cr-working-env:cpu
  • Pull the gpu image
docker pull corerain/cr-working-env:gpu
  • List your local image
docker image ls
  • Your image will print as:
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
corerain/cr-working-env   latest              c401aeef9562        About an hour ago   7.22GB
  • Replace c401aeef9562 with your own IMAGE ID
docker run -it c401aeef9562 /bin/bash
  • Or for more options like GUI, shared folder and driving FPGA etc., you need a more complicated docker run command. Again, replace c401aeef9562 with your own IMAGE ID.
docker run \
         --name <GIVE A NAME TO CONTAINER> \
         --network host \
         --ipc=host \
         -e DISPLAY=$DISPLAY \
         -v /tmp/.X11-unix/:/tmp/.X11-unix/ \
         -v <A HOST DIRECTORY>:<A DOCKER CONTAINER DIRECTORY> \
         --device /dev/altera_dma0:/dev/altera_dma0 \
         --device /dev/altera_dma_buf0:/dev/altera_dma_buf0 \
         -it c401aeef9562 \
         /bin/bash
  • Options explained for Corerain use case:

--name <GIVE A NAME TO CONTAINER>: Give a name to your container

--network host: Connect the container to host

--ipc=host: Allow inter-process communication between container and host

-e DISPLAY=$DISPLAY: Set display variable (for GUI)

-v /tmp/.X11-unix/:/tmp/.X11-unix/: Bind mount host /tmp/.X11-unix/, to docker /tmp/.X11-unix/ (for GUI)

-v <A HOST DIRECTORY>:<A DOCKER CONTAINER DIRECTORY>: Make a shared folder between host and docker

--device /dev/altera_dma0:/dev/altera_dma0: Add FPGA pcie device. Change the device accordingly

--device /dev/altera_dma_buf0:/dev/altera_dma_buf0: Add FPGA pcie device. Change the device accordingly

  • You are in the docker env now. Enjoy ;)
⁠Some basic commands

To list all your local image: docker image ls

To remove an image: docker image rm <IMAGE ID>

To create a container: docker create -it <IMAGE ID> /bin/bash

To create and run a container: docker run -it <IMAGE ID> /bin/bash

To list all your local container: docker container ls -a

To list all your local running container: docker container ps

To remove a container: docker container rm <CONTAINER ID>

To start a container: docker start <CONTAINER ID>

To stop a container: docker stop <CONTAINER ID>

To access a running container env: docker exec -it <CONTAINER ID> /bin/bash

⁠Contacts

Hao Jiang ([email protected]⁠)

Yongqing Wu ([email protected]⁠)

Tag summary

Content type

Image

Digest

Size

3.6 GB

Last updated

over 7 years ago

docker pull corerain/cr-working-env:gpu