Repository navigation
Extend dockerization - #365
Conversation
With text=auto alone, a Windows checkout with core.autocrlf turns *.sh into CRLF files. Copied into a Linux container they fail on the first line, because the kernel looks for an interpreter named "sh\r".
* `docker/Dockerfile` builds an image for servers and batch jobs. * Both Whisper models (precise and fast) are fetched from Hugging Face during the build, pinned to a revision and checked by SHA-256 * The local `models/` folder is kept out by `Dockerfile.dockerignore`. * `docker/requirements.lcok`: The build installs under that set and fails if the result differs; `docker/update-lock.sh` regenerates it. * The entrypoint appends --no-gui; with `gui` as first argument it starts the regular window instead, which needs an X server from the host. The container runs as UID 1000, with /config and $HOME writable for anyone so that --user works too.
`docker/README.md` covers build, usage, file permissions, settings and additional models, the experimental GUI mode, how the lock file is maintained, and the name clash with the image tag used by `generate_linux_binary.sh`. The main `README` links to it.
|
Thank you, this looks nice. Two questions:
|
|
Thanks for taking a look! ARM64 True: on the PyTorch CPU index, When I was checking this I think I also found a second blocker that is independent of the lock: I would suggest for this PR as a first start: State clearly that the image is amd64 only, and document CUDA Doable, and I totally agree it's the obvious use case. The torch index is already a build argument and noScribe detects CUDA by itself, so the main work left to do is:
The cuda image will be several GB larger, so I'd build it as a separate tag rather than making it the default. I'd prefer to do this as a follow-up PR so this one stays small. I have an NVIDIA card to test the build and GPU detection with, but it is short on VRAM, so I may need someone with a larger card to confirm a full run with the precise model. |
The lock file is now checked out with LF and the comparison strips CRs; with core.autocrlf=true every line differed and the build failed. PYTHONSAFEPATH=1 stops `python -m` from putting the mounted folder ahead of PYTHONPATH, where it could shadow the image's code and models.
|
Two things that may help with the torchcodec question on ARM64: The torch 2.8 pin on Linux looks outdated. The comment in noScribe does not use torchcodec at runtime. Since 72fc97f the diarization worker reads noScribe's own converted WAV with soundfile and hands pyannote the waveform in memory ( (Written with help from Claude Code; the facts are from our own testing in #327 and from the code.) |
|
I think this would be a good opportunity to take a look at the all the linux requirements, as they may be outdated. I don't have a test machine at the moment. Are you on Linux, @chrtmnn? Could you take a look? |
Not natively, I'm on Windows. But the image is a Linux test bed anyway: Docker Desktop runs containers on WSL2, and the build installs Proposal, since happyarts' notes remove the torchcodec blocker (the macOS stack from #327 has Linux aarch64 wheels, and noScribe doesn't use torchcodec at runtime):
Proposed image tags: If that works for you, feel free to merge this PR once I've pushed the README changes. |
|
@kaixxx, a small question about something outside the Docker image itself:
noScribe/generate_linux_binary.sh Lines 3 to 4 in 03d4d18 docker buildx build --platform linux/amd64 -t noscribe .
docker run --rm -it --mount type=bind,src=.,dst=/usr/src/app noscribe pyinstaller noScribe-linux.specRunning the script therefore silently replaces a locally built
Would you be fine with renaming the tag in the script, e.g. to |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@chrtmnn I'm not sure if I understand the issue completely. But don't you think we should replace |
|
@kaixxx The two Dockerfiles cover two different jobs:
They only share the installation of The only overlap is the local image name |
|
One addition: The Linux binary is built without Docker in |
|
Hi @kaixxx, a quick friendly ping on this one. Current stand
Your open question on
Just tell me which you prefer and I'll open that PR. Next up after the merge
Thanks! |
|
Thanks for the ping ;) |
Add a Docker image that runs noScribe headless on the CPU
This adds
docker/Dockerfile, an image for servers and batch jobs: audio in, transcript out. Everything runs locally in the container, and nothing is downloaded at runtime.What is in the resulting image
modelsfolder is kept out of the build context.--no-gui, so all noScribe command line options work as usual. With 'gui` as the first argument it starts the regular window instead, which needs an X server from the host (experimental, only tried on Windows 11 with Docker Desktop/WSLg).--user "$(id -u):$(id -g)"works too. Settings live in/config/noScribeand can be kept in a volume.Closes #364