annotate service/speechMusic/makefile @ 453:9fd92202c886

WIP updating to read sounds from http Ignore-this: 9a7aa4cdd539ed1ace268f42ad76021a
author drewp@bigasterisk.com
date Fri, 19 Apr 2019 11:57:51 -0700
parents b3959142d7d8
children ccde9f432e4e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
1 JOB=speech_music
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
2 PORT=9049
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
3
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
4 TAG=bang6:5000/${JOB}_x86:latest
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
5 TAG_PI=bang6:5000/${JOB}_pi:latest
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
6
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
7 prep_ctx:
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
8 rm -rf tmp_ctx
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
9 mkdir -p tmp_ctx
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
10 cp -a Dockerfile* ../../lib/*.py *.py *.jade req* *.conf /my/proj/csigen/generator.py tmp_ctx
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
11
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
12 build_image: prep_ctx
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
13 docker build --network=host -t ${TAG} tmp_ctx
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
14
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
15 push_image: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
16 docker push ${TAG}
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
17
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
18
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
19 build_image_pi: prep_ctx
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
20 docker build --network=host --file=tmp_ctx/Dockerfile.pi -t ${TAG_PI} tmp_ctx
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
21
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
22 push_image_pi: build_image_pi
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
23 docker push ${TAG_PI}
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
24
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
25 shell: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
26 docker run --rm -it --cap-add SYS_PTRACE --net=host -v /tmp/pulseaudio:/tmp/pulseaudio ${TAG} /bin/bash
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
27
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
28 pactl_test: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
29 docker run --rm -it --cap-add SYS_PTRACE --net=host -v /tmp/pulseaudio:/tmp/pulseaudio ${TAG} pactl stat
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
30
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
31 paplay_test_that_is_loud: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
32 docker run --rm -it --cap-add SYS_PTRACE --net=host -v /tmp/pulseaudio:/tmp/pulseaudio ${TAG} paplay /usr/local/lib/python2.7/dist-packages/pygame/examples/data/whiff.wav
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
33
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
34 pygame_test: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
35 docker run --rm -it --cap-add SYS_PTRACE --net=host -e SDL_AUDIOSERVER=pulseaudio -v /tmp/pulseaudio:/tmp/pulseaudio ${TAG} python -c 'import os; print os.environ; import pygame.mixer; pygame.mixer.init()'
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
36
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
37
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
38 local_run: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
39 docker run --rm -it -p ${PORT}:${PORT} \
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
40 -v `pwd`:/mnt \
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
41 --name=$(JOB)_local \
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
42 --net=host \
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
43 -v /tmp/pulseaudio:/tmp/pulseaudio \
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
44 ${TAG} \
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
45 python /mnt/speechMusic.py -v
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
46
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
47 local_run_strace: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
48 docker run --rm -it -p ${PORT}:${PORT} \
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
49 -v `pwd`:/mnt \
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
50 --name=$(JOB)_local \
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
51 --net=host \
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
52 -v /tmp/pulseaudio:/tmp/pulseaudio \
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
53 --cap-add SYS_PTRACE \
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
54 -e SDL_AUDIOSERVER=pulse \
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
55 ${TAG} \
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
56 strace -f -tts 200 python /mnt/speechMusic.py -v
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
57
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
58 fresh_sudo:
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
59 sudo -v
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
60
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
61 redeploy: fresh_sudo push_image push_image_pi
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
62 sudo /my/proj/ansible/playbook -l with_speakers -t $(JOB)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
63 supervisorctl -s http://dash:9001/ restart $(JOB)_$(PORT)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
64 supervisorctl -s http://slash:9001/ restart $(JOB)_$(PORT)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
65 supervisorctl -s http://bed:9001/ restart $(JOB)_$(PORT)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
66 supervisorctl -s http://living:9001/ restart $(JOB)_$(PORT)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
67 supervisorctl -s http://kitchen:9001/ restart $(JOB)_$(PORT)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
68