Skip to content

Commit

Permalink
Merge pull request #122 from ReproNim/nf-container-sound
Browse files Browse the repository at this point in the history
Extend psychopy singularity container with sound dependencies
  • Loading branch information
yarikoptic authored Nov 27, 2024
2 parents ce7e36f + 8cc56b1 commit 705b900
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
12 changes: 9 additions & 3 deletions containers/reprostim-timesync/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ RUN apt-get update -qq \
libwxgtk-webview3.2-dev \
libwxgtk3.2-dev \
ncdu \
pavucontrol \
pigz \
pkg-config \
portaudio19-dev \
procps \
pulseaudio \
pulseaudio-utils \
python3 \
python3-pip \
strace \
Expand All @@ -56,7 +59,7 @@ RUN apt-get update -qq \
&& rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/wieluk/psychopy_linux_installer/ /opt/psychopy-installer; cd /opt/psychopy-installer; git checkout 21b1ac36ee648e00cc3b68fd402c1e826270dad6
RUN /opt/psychopy-installer/psychopy_linux_installer.sh --install_dir=/opt/psychopy --psychopy_version=2024.1.4 --bids_version=2023.2.0 --python_version=3.10.14 --wxpython_version=4.2.1 -v -f
RUN /opt/psychopy/psychopy_*/bin/pip install qrcode
RUN /opt/psychopy/psychopy_*/bin/pip install qrcode pyzbar opencv-python numpy click pydantic sounddevice scipy pydub pyaudio reedsolo psychopy-sounddevice
RUN bash -c 'ln -s /opt/psychopy/psychopy_*/bin/psychopy /usr/local/bin/'
RUN bash -c 'b=$(ls /opt/psychopy/psychopy_*/bin/python3); echo -e "#!/bin/sh\n$b \"\$@\"" >| /usr/local/bin/python3; chmod a+x /usr/local/bin/python3'
ENTRYPOINT ["python3"]
Expand Down Expand Up @@ -104,6 +107,9 @@ RUN printf '{ \
"libusb-1.0-0-dev", \
"portaudio19-dev", \
"libasound2-dev", \
"pulseaudio", \
"pavucontrol", \
"pulseaudio-utils", \
"vim", \
"wget", \
"strace", \
Expand All @@ -124,7 +130,7 @@ RUN printf '{ \
{ \
"name": "run", \
"kwds": { \
"command": "apt-get update -qq \\\\\\n && apt-get install -y -q --no-install-recommends \\\\\\n build-essential \\\\\\n curl \\\\\\n git \\\\\\n gnupg \\\\\\n less \\\\\\n libasound2-dev \\\\\\n libcanberra-gtk3-module \\\\\\n libgtk-3-dev \\\\\\n libusb-1.0-0-dev \\\\\\n libwxgtk-media3.2-dev \\\\\\n libwxgtk-webview3.2-dev \\\\\\n libwxgtk3.2-dev \\\\\\n ncdu \\\\\\n pigz \\\\\\n pkg-config \\\\\\n portaudio19-dev \\\\\\n procps \\\\\\n python3 \\\\\\n python3-pip \\\\\\n strace \\\\\\n sudo \\\\\\n time \\\\\\n tree \\\\\\n vim \\\\\\n wget \\\\\\n && rm -rf /var/lib/apt/lists/*" \
"command": "apt-get update -qq \\\\\\n && apt-get install -y -q --no-install-recommends \\\\\\n build-essential \\\\\\n curl \\\\\\n git \\\\\\n gnupg \\\\\\n less \\\\\\n libasound2-dev \\\\\\n libcanberra-gtk3-module \\\\\\n libgtk-3-dev \\\\\\n libusb-1.0-0-dev \\\\\\n libwxgtk-media3.2-dev \\\\\\n libwxgtk-webview3.2-dev \\\\\\n libwxgtk3.2-dev \\\\\\n ncdu \\\\\\n pavucontrol \\\\\\n pigz \\\\\\n pkg-config \\\\\\n portaudio19-dev \\\\\\n procps \\\\\\n pulseaudio \\\\\\n pulseaudio-utils \\\\\\n python3 \\\\\\n python3-pip \\\\\\n strace \\\\\\n sudo \\\\\\n time \\\\\\n tree \\\\\\n vim \\\\\\n wget \\\\\\n && rm -rf /var/lib/apt/lists/*" \
} \
}, \
{ \
Expand All @@ -142,7 +148,7 @@ RUN printf '{ \
{ \
"name": "run", \
"kwds": { \
"command": "/opt/psychopy/psychopy_*/bin/pip install qrcode" \
"command": "/opt/psychopy/psychopy_*/bin/pip install qrcode pyzbar opencv-python numpy click pydantic sounddevice scipy pydub pyaudio reedsolo psychopy-sounddevice" \
} \
}, \
{ \
Expand Down
12 changes: 9 additions & 3 deletions containers/reprostim-timesync/Singularity
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ apt-get install -y -q --no-install-recommends \
libwxgtk-webview3.2-dev \
libwxgtk3.2-dev \
ncdu \
pavucontrol \
pigz \
pkg-config \
portaudio19-dev \
procps \
pulseaudio \
pulseaudio-utils \
python3 \
python3-pip \
strace \
Expand All @@ -65,7 +68,7 @@ git clone https://github.com/wieluk/psychopy_linux_installer/ /opt/psychopy-inst

/opt/psychopy-installer/psychopy_linux_installer.sh --install_dir=/opt/psychopy --psychopy_version=2024.1.4 --bids_version=2023.2.0 --python_version=3.10.14 --wxpython_version=4.2.1 -v -f

/opt/psychopy/psychopy_*/bin/pip install qrcode
/opt/psychopy/psychopy_*/bin/pip install qrcode pyzbar opencv-python numpy click pydantic sounddevice scipy pydub pyaudio reedsolo psychopy-sounddevice

bash -c 'ln -s /opt/psychopy/psychopy_*/bin/psychopy /usr/local/bin/'

Expand Down Expand Up @@ -114,6 +117,9 @@ printf '{ \
"libusb-1.0-0-dev", \
"portaudio19-dev", \
"libasound2-dev", \
"pulseaudio", \
"pavucontrol", \
"pulseaudio-utils", \
"vim", \
"wget", \
"strace", \
Expand All @@ -134,7 +140,7 @@ printf '{ \
{ \
"name": "run", \
"kwds": { \
"command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n build-essential \\\\\\n curl \\\\\\n git \\\\\\n gnupg \\\\\\n less \\\\\\n libasound2-dev \\\\\\n libcanberra-gtk3-module \\\\\\n libgtk-3-dev \\\\\\n libusb-1.0-0-dev \\\\\\n libwxgtk-media3.2-dev \\\\\\n libwxgtk-webview3.2-dev \\\\\\n libwxgtk3.2-dev \\\\\\n ncdu \\\\\\n pigz \\\\\\n pkg-config \\\\\\n portaudio19-dev \\\\\\n procps \\\\\\n python3 \\\\\\n python3-pip \\\\\\n strace \\\\\\n sudo \\\\\\n time \\\\\\n tree \\\\\\n vim \\\\\\n wget\\nrm -rf /var/lib/apt/lists/*" \
"command": "apt-get update -qq\\napt-get install -y -q --no-install-recommends \\\\\\n build-essential \\\\\\n curl \\\\\\n git \\\\\\n gnupg \\\\\\n less \\\\\\n libasound2-dev \\\\\\n libcanberra-gtk3-module \\\\\\n libgtk-3-dev \\\\\\n libusb-1.0-0-dev \\\\\\n libwxgtk-media3.2-dev \\\\\\n libwxgtk-webview3.2-dev \\\\\\n libwxgtk3.2-dev \\\\\\n ncdu \\\\\\n pavucontrol \\\\\\n pigz \\\\\\n pkg-config \\\\\\n portaudio19-dev \\\\\\n procps \\\\\\n pulseaudio \\\\\\n pulseaudio-utils \\\\\\n python3 \\\\\\n python3-pip \\\\\\n strace \\\\\\n sudo \\\\\\n time \\\\\\n tree \\\\\\n vim \\\\\\n wget\\nrm -rf /var/lib/apt/lists/*" \
} \
}, \
{ \
Expand All @@ -152,7 +158,7 @@ printf '{ \
{ \
"name": "run", \
"kwds": { \
"command": "/opt/psychopy/psychopy_*/bin/pip install qrcode" \
"command": "/opt/psychopy/psychopy_*/bin/pip install qrcode pyzbar opencv-python numpy click pydantic sounddevice scipy pydub pyaudio reedsolo psychopy-sounddevice" \
} \
}, \
{ \
Expand Down
4 changes: 2 additions & 2 deletions containers/reprostim-timesync/generate_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ generate() {
--install build-essential pkg-config git \
sudo \
libgtk-3-dev libwxgtk3.2-dev libwxgtk-media3.2-dev libwxgtk-webview3.2-dev libcanberra-gtk3-module \
libusb-1.0-0-dev portaudio19-dev libasound2-dev \
libusb-1.0-0-dev portaudio19-dev libasound2-dev pulseaudio pavucontrol pulseaudio-utils \
vim wget strace time ncdu gnupg curl procps pigz less tree python3 python3-pip \
--run "git clone https://github.com/wieluk/psychopy_linux_installer/ /opt/psychopy-installer; cd /opt/psychopy-installer; git checkout 21b1ac36ee648e00cc3b68fd402c1e826270dad6" \
--run "/opt/psychopy-installer/psychopy_linux_installer.sh --install_dir=/opt/psychopy --psychopy_version=2024.1.4 --bids_version=2023.2.0 --python_version=3.10.14 --wxpython_version=4.2.1 -v -f" \
--run "/opt/psychopy/psychopy_*/bin/pip install qrcode" \
--run "/opt/psychopy/psychopy_*/bin/pip install qrcode pyzbar opencv-python numpy click pydantic sounddevice scipy pydub pyaudio reedsolo psychopy-sounddevice" \
--run "bash -c 'ln -s /opt/psychopy/psychopy_*/bin/psychopy /usr/local/bin/'" \
--run "bash -c 'b=\$(ls /opt/psychopy/psychopy_*/bin/python3); echo -e \"#!/bin/sh\n\$b \\\"\\\$@\\\"\" >| /usr/local/bin/python3; chmod a+x /usr/local/bin/python3'" \
--entrypoint python3
Expand Down

0 comments on commit 705b900

Please sign in to comment.