From f8ed5552ccfb6a41467f4c8ad930ed55938f7fdb Mon Sep 17 00:00:00 2001 From: Max Frei Date: Sat, 23 Nov 2019 12:52:01 -0800 Subject: [PATCH] GUI support for docker. (#379) Summary: Thanks for the great repo! I very much like the easy set up via docker. However, one of the first things I did, was to figure out a way to display stuff like images or plots, without having to save them as images. I thought this might be interestering to others as well. Kind regards. Pull Request resolved: https://github.com/facebookresearch/detectron2/pull/379 Differential Revision: D18673252 Pulled By: ppwwyyxx fbshipit-source-id: 4934fae9be0fe778bd1425340a15320ec3fa9bd2 --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9db5e8d..3d1709c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,11 @@ FROM nvidia/cuda:10.1-cudnn7-devel # To use this Dockerfile: # 1. `nvidia-docker build -t detectron2:v0 .` # 2. `nvidia-docker run -it --name detectron2 detectron2:v0` +# +# To enable GUI support (Linux): +# 1. Grant the container temporary access to your x server (will be reverted at reboot of your host): +# `xhost +local:`docker inspect --format='{{ .Config.Hostname }}' detectron2`` +# 2. `nvidia-docker run -it --name detectron2 --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" detectron2:v0` ENV DEBIAN_FRONTEND noninteractive