Two hands-on examples for the SBX work meeting
Hint: Don't do this in you home folder! Use e.g. /var/tmp/<your_name>
instead. And don't forget to clean up!
- Clone repository and enter container directory
git clone https://github.com/spraakbanken/work_meeting_autumn_2024 && cd work_meeting_autumn_2024/whisper
- touch .nobackup
- Create virtual environment
virtualenv env && . ./env/bin/activate
orpython -m venv env && source env/bin/activate
- Install pytorch
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
(You might have to useTMPDIR=/var/tmp pip
if you happen to run out of space in/tmp
) - Install all other dependencies
pip install -r requirements.txt
- Download demo data
bash download.sh
- Run transcription
LD_PRELOAD=./env/lib/python3.9/site-packages/nvidia/cudnn/lib/libcudnn.so.9 python transcribe.py input.mp3
- Clone repository and enter container directory
git clone https://github.com/spraakbanken/work_meeting_autumn_2024 && cd work_meeting_autumn_2024/container
- Build image `podman compose build
- Start container in the background
podman compose up -d
- Exclude from backup
touch ~/.local/share/containers/.nobackup
- Enable linger, i.e. user processes are not automatically ended when logging out,
loginctl enable-linger
- create .htaccess file e.g. in /export/htdocs/herbert/container`
RewriteRule ^(.*)$ http://localhost:5000/$1 [P]
Header edit* Location "http://localhost:5000/" "http://demo.spraakdata.gu.se/herbert/container"