Compare commits

..

1 Commits

Author SHA1 Message Date
Julien Mercier-Rojas
75f6e09eff Initialize docker version of LG 2024-08-29 22:23:37 +02:00
6 changed files with 167 additions and 1 deletions

6
.docker/Dockerfile Normal file
View File

@ -0,0 +1,6 @@
FROM python
RUN pip install redis numpy scipy pyserial
RUN mkdir -p /project
WORKDIR /project
CMD python main.py

119
.docker/LJ.conf.docker Normal file
View File

@ -0,0 +1,119 @@
[General]
lasernumber = 1
debug = 0
rediserverip = redis
wwwip = 10.0.2.3
nozoscip = 127.0.0.1
oscserverip = 127.0.0.1
autostart = artnet
wstype = ws
wsport = 9001
[laser0]
color = -1
type = LOCAL
dac_family = helios
ip = 127.0.0.1
kpps = 10000
centerx = 7.0
centery = 61.0
zoomx = 312.0
zoomy = 1039.0
sizex = 32000.0
sizey = 32000.0
finangle = -0.02263757042605427
intens = 255.0
red = 100
green = 100
blue = 100
swapx = -1
swapy = -1
lsteps = [ (1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[laser1]
color = -1
type = LOCAL
dac_family = helios
ip = 192.168.2.5
kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
intens = 255
red = 100
green = 100
blue = 100
swapx = -1
swapy = -1
lsteps = [ (1.0, 2),(0.25, 1), (0.75, 1), (1.0, 5)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[laser2]
color = -1
type = LUKE400
dac_family = helios
ip = 192.168.2.6
kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
intens = 255
red = 100
green = 100
blue = 100
swapx = -1
swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[laser3]
color = -1
type = LUKE400
dac_family = helios
ip = 192.168.1.5
kpps = 25000
centerx = 0
centery = 0
zoomx = 50.0
zoomy = 50.0
sizex = 32000
sizey = 32000
finangle = 0.0
intens = 255
red = 100
green = 100
blue = 1000
swapx = -1
swapy = -1
lsteps = [(1.0, 8),(0.25, 3), (0.75, 3), (1.0, 10)]
warpdest = [[-1500., 1500.],
[ 1500., 1500.],
[ 1500.,-1500.],
[-1500.,-1500.]]
[plugins]
plugins = {
"aurora": {"OSC": 8090, "command": "python3 plugins/aurora/aurora.py", "display": True},
"artnet": {"OSC": 8009, "command": "python3 libs3/artnet.py", "display": False},
"square": {"OSC": 8013, "command": "python3 plugins/square.py", "display": True},
"custom1": {"OSC": 8014, "command": "python3 plugins/custom1.py", "display": True}
}

1
.docker/config.js.docker Normal file
View File

@ -0,0 +1 @@
websocket_uri = "ws://127.0.0.1:9001/"

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.*swp* .*swp*
*__pycache__ *__pycache__
www/config.js www/config.js
.idea

39
docker-compose.yml Normal file
View File

@ -0,0 +1,39 @@
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.0.2.0/24
services:
redis:
image: redis
networks:
default:
ipv4_address: 10.0.2.2
lj:
build:
dockerfile: Dockerfile
context: .docker/
ports:
- "9001:9001"
- "9002:9002"
volumes:
- .:/project
- .docker/LJ.conf.docker:/project/LJ.conf
networks:
default:
ipv4_address: 10.0.2.3
apache:
image: httpd
ports:
- "8080:80"
volumes:
- ./www:/usr/local/apache2/htdocs/
- .docker/config.js.docker:/usr/local/apache2/htdocs/config.js:ro
networks:
default:
ipv4_address: 10.0.2.4

View File

@ -158,7 +158,7 @@ oscserverIP = gstt.oscIPin
# OSC Server : accept OSC message on port 8002 # OSC Server : accept OSC message on port 8002
#oscIPin = "192.168.1.10"s #oscIPin = "192.168.1.10"s
oscserverIPin = serverIP oscserverIPin = oscserverIP
oscserverPORTin = 8002 oscserverPORTin = 8002
# OSC Client : to send OSC message to an IP port 8001 # OSC Client : to send OSC message to an IP port 8001