Mercurial > code > home > repos > homeauto
annotate service/playSound/Dockerfile @ 666:91d17a68c21b
drop speech synth, try to get pulse client working
Ignore-this: f032ddd2169cbb668c11ed7d48f7de23
author | drewp@bigasterisk.com |
---|---|
date | Thu, 19 Dec 2019 17:33:24 -0800 |
parents | 28cc07978a71 |
children | aaabba10ce04 |
rev | line source |
---|---|
359
b3959142d7d8
move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff
changeset
|
1 FROM bang6:5000/base_x86 |
b3959142d7d8
move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff
changeset
|
2 |
b3959142d7d8
move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff
changeset
|
3 WORKDIR /opt |
b3959142d7d8
move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff
changeset
|
4 |
664 | 5 |
666
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
6 #RUN apt-get install -y libsdl-mixer-dev libsdl-mixer1.2-dev |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
7 # wget https://www.pygame.org/ftp/pygame-1.9.6.tar.gz |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
8 # 34 tar xvzf pygame-1.9.6.tar.gz |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
9 # 35 cd pygame-1.9.6 |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
10 # python3 setup.py install |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
11 # python3 -c 'import pygame; print(pygame.__version__, pygame.__file__); pygame.mixer.init()' |
664 | 12 |
13 | |
14 RUN touch need-new-update | |
454
ccde9f432e4e
WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents:
359
diff
changeset
|
15 RUN apt-get update |
666
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
16 RUN apt-get install --yes libopenal1 libogg0 pulseaudio-utils python-pygame |
359
b3959142d7d8
move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff
changeset
|
17 COPY requirements.txt ./ |
664 | 18 RUN pip3 install --index-url https://projects.bigasterisk.com/ --extra-index-url https://pypi.org/simple -r requirements.txt |
359
b3959142d7d8
move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff
changeset
|
19 |
454
ccde9f432e4e
WIP speechmusic to load from http, but pulseaudio out is broken
drewp@bigasterisk.com
parents:
359
diff
changeset
|
20 ENV SDL_AUDIODRIVER pulse |
359
b3959142d7d8
move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff
changeset
|
21 COPY pulse-client.conf /etc/pulse/client.conf |
666
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
22 COPY *.py ./ |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
23 |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
24 # ENV UNAME pulseuser |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
25 # RUN export UNAME=$UNAME UID=501 GID=501 && \ |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
26 # mkdir -p "/home/${UNAME}" && \ |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
27 # echo "${UNAME}:x:${UID}:${GID}:${UNAME} User,,,:/home/${UNAME}:/bin/bash" >> /etc/passwd && \ |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
28 # echo "${UNAME}:x:${UID}:" >> /etc/group && \ |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
29 # mkdir -p /etc/sudoers.d && \ |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
30 # echo "${UNAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/${UNAME} && \ |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
31 # chmod 0440 /etc/sudoers.d/${UNAME} && \ |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
32 # chown ${UID}:${GID} -R /home/${UNAME} && \ |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
33 # gpasswd -a ${UNAME} audio |
91d17a68c21b
drop speech synth, try to get pulse client working
drewp@bigasterisk.com
parents:
664
diff
changeset
|
34 # USER $UNAME |
359
b3959142d7d8
move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff
changeset
|
35 |
b3959142d7d8
move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff
changeset
|
36 EXPOSE 9049 |
b3959142d7d8
move speech_music into docker and into pygame
drewp@bigasterisk.com
parents:
diff
changeset
|
37 |
664 | 38 CMD [ "python3", "./playSound.py" ] |