annotate service/speechMusic/makefile @ 454:ccde9f432e4e

WIP speechmusic to load from http, but pulseaudio out is broken Ignore-this: 28a41741b1f33114348f5ec6e7b4bef9
author drewp@bigasterisk.com
date Fri, 19 Apr 2019 13:51:54 -0700
parents 9fd92202c886
children 7e09c0d0a86e
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
454
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
26 docker run --rm -it \
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
27 --cap-add SYS_PTRACE \
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
28 --name=$(JOB)_shell \
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
29 --mount type=tmpfs,destination=/tmp,tmpfs-size=52428800 \
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
30 --net=host \
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
31 -v /tmp/pulseaudio:/tmp/pulseaudio \
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
32 ${TAG} \
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
33 /bin/bash
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
34
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
35 pactl_test: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
36 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
37
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
38 paplay_test_that_is_loud: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
39 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
40
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
41 pygame_test: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
42 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
43
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
44
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
45 local_run: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
46 docker run --rm -it -p ${PORT}:${PORT} \
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
47 --name=$(JOB)_local \
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
48 --net=host \
454
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
49 --mount type=tmpfs,destination=/sounds,tmpfs-size=52428800 \
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
50 -v /tmp/pulseaudio:/tmp/pulseaudio \
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
51 ${TAG} \
454
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
52 python speechMusic.py -v
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
53
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
54 local_run_strace: build_image
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
55 docker run --rm -it -p ${PORT}:${PORT} \
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
56 -v `pwd`:/mnt \
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
57 --name=$(JOB)_local \
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
58 --net=host \
453
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
59 -v /tmp/pulseaudio:/tmp/pulseaudio \
454
ccde9f432e4e WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents: 453
diff changeset
60 --mount type=tmpfs,destination=/sounds,tmpfs-size=52428800 \
359
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
61 --cap-add SYS_PTRACE \
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
62 ${TAG} \
b3959142d7d8 move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff changeset
63 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
64
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
65 fresh_sudo:
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
66 sudo -v
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
67
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
68 redeploy: fresh_sudo push_image push_image_pi
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
69 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
70 supervisorctl -s http://dash:9001/ restart $(JOB)_$(PORT)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
71 supervisorctl -s http://slash:9001/ restart $(JOB)_$(PORT)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
72 supervisorctl -s http://bed:9001/ restart $(JOB)_$(PORT)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
73 supervisorctl -s http://living:9001/ restart $(JOB)_$(PORT)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
74 supervisorctl -s http://kitchen:9001/ restart $(JOB)_$(PORT)
9fd92202c886 WIP updating to read sounds from http
drewp@bigasterisk.com
parents: 359
diff changeset
75