-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
28 lines (28 loc) · 1005 Bytes
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
version: '3.2'
services:
opencv:
# build:
# context: './docker/'
# args:
# PYTHON_VERSION: ${PYTHON_VERSION}
image: thanhtu/opencv_tf:latest
tty: true
working_dir: /home/opencv
volumes:
- ./src/:/home/opencv
- ./build.sh:/usr/local/bin/build
- /tmp/.X11-unix:/tmp/.X11-unix:rw
# defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
# apt install -y nvidia-340 mesa-utils && glxgears
# newest version: add-apt-repository ppa:graphics-drivers && apt update && apt install -y nvidia-390
container_name: opencv
ports:
- 8888:8888
privileged: true
environment:
- PYTHON_VERSION=${PYTHON_VERSION}
- LC_ALL=C.UTF-8
- LANG=C.UTF-8
# docker on linux will run faster with nvidia-docker
# - DISPLAY=`ifconfig en0 inet | grep inet | awk '{print $2}'`:0
- DISPLAY=docker.for.mac.localhost:0 # socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" >> /dev/null &