Page MenuHomeSoftware Heritage

base-buster: Install emscripten required by swh-search
ClosedPublic

Authored by anlambert on Fri, Jul 16, 4:50 PM.

Details

Summary

This seems sufficient to build the tree-sitter WASM module for the
swh-search search language parser.

I managed to build the WASM module for the tree-sitter Python parser
so I guess this should work too for the swh search language parser.

(swh) ✔ ~/swh/swh-jenkins-dockerfiles/base-buster [master|✚ 1] 
16:41 $ docker run -it swh-jenkins/base-buster /bin/bash
jenkins@26e3c3b4ea73:~$ yarn add tree-sitter-cli
yarn add v1.22.5
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ tree-sitter-cli@0.20.0
info All dependencies
└─ tree-sitter-cli@0.20.0
Done in 1.03s.
jenkins@26e3c3b4ea73:~$ export PATH=~/node_modules/.bin/:$PATH
jenkins@26e3c3b4ea73:~$ git clone https://github.com/tree-sitter/tree-sitter-python
Cloning into 'tree-sitter-python'...
remote: Enumerating objects: 2375, done.
remote: Counting objects: 100% (119/119), done.
remote: Compressing objects: 100% (81/81), done.
remote: Total 2375 (delta 60), reused 81 (delta 31), pack-reused 2256
Receiving objects: 100% (2375/2375), 18.26 MiB | 26.71 MiB/s, done.
Resolving deltas: 100% (1489/1489), done.
jenkins@26e3c3b4ea73:~$ cd tree-sitter-python/
jenkins@26e3c3b4ea73:~/tree-sitter-python$ tree-sitter build-wasm
jenkins@26e3c3b4ea73:~/tree-sitter-python$ git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        tree-sitter-python.wasm

nothing added to commit but untracked files present (use "git add" to track)
jenkins@26e3c3b4ea73:~/tree-sitter-python$

Diff Detail

Repository
rCDFJ Dockerfiles for Jenkins
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert created this revision.

Update:

  • install as root and in /opt
  • update commit message
vlorentz added a subscriber: vlorentz.

thanks!

base-buster/Dockerfile
57

We may move it to swh-web eventually, though

This revision is now accepted and ready to land.Fri, Jul 16, 5:06 PM
base-buster/Dockerfile
57

Not if we bundle the WASM module in swh-search data files, swh-web will serve it as static file (just a static dir to add in django settings) in order to be consumed by web-tree-sitter.