Skip to content

Commit

Permalink
Adding a Dockerfile to create an image with all the dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
RuVT committed Apr 25, 2020
1 parent a6b2be4 commit ea4e968
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ubuntu:latest
RUN apt-get update
RUN apt install -y python3
RUN apt install -y python3-pip
RUN apt install -y cmake
RUN apt install -y libsm6
RUN apt install -y libxext6
RUN apt install -y libxrender1
RUN apt install -y libfontconfig1
RUN pip3 install opencv-python
COPY . /home/GazeTracking
WORKDIR /home/GazeTracking
RUN pip3 install -r requirements.txt
12 changes: 12 additions & 0 deletions build_and_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
IMAGE_NAME=gaze-tracking

# allow root access to x server
xhost local:root
# build and run docker image
([ "$(docker images -q ${IMAGE_NAME})" == "" ] && docker build -t ${IMAGE_NAME} . )
([ "$(docker images -q ${IMAGE_NAME})" != "" ] && \
docker run --rm --device /dev/video0 \
-e DISPLAY=${DISPLAY} \
-v /tmp/.X11-unix:/tmp/.X11-unix \
--env="QT_X11_NO_MITSHM=1" \
-it ${IMAGE_NAME} bash)

0 comments on commit ea4e968

Please sign in to comment.