{"id":31935103,"url":"https://github.com/rpardini/mesa-teflon-etnaviv-rocket-docker","last_synced_at":"2026-02-17T08:06:58.408Z","repository":{"id":313808835,"uuid":"1052783490","full_name":"rpardini/mesa-teflon-etnaviv-rocket-docker","owner":"rpardini","description":"Docker image for quickly testing upstream Mesa's Teflon delegate for Etnaviv and Rocket","archived":false,"fork":false,"pushed_at":"2025-09-08T15:27:58.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-08T16:44:22.811Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rpardini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-08T14:40:55.000Z","updated_at":"2025-09-08T15:28:02.000Z","dependencies_parsed_at":"2025-09-08T16:44:24.675Z","dependency_job_id":"fcdad05c-1097-4cf1-9477-2bb536e10f9d","html_url":"https://github.com/rpardini/mesa-teflon-etnaviv-rocket-docker","commit_stats":null,"previous_names":["rpardini/mesa-teflon-etnaviv-rocket-docker"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rpardini/mesa-teflon-etnaviv-rocket-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpardini%2Fmesa-teflon-etnaviv-rocket-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpardini%2Fmesa-teflon-etnaviv-rocket-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpardini%2Fmesa-teflon-etnaviv-rocket-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpardini%2Fmesa-teflon-etnaviv-rocket-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rpardini","download_url":"https://codeload.github.com/rpardini/mesa-teflon-etnaviv-rocket-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpardini%2Fmesa-teflon-etnaviv-rocket-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018141,"owners_count":26086285,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-14T06:58:03.937Z","updated_at":"2025-10-14T06:58:09.404Z","avatar_url":"https://github.com/rpardini.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker image with upstream Mesa with Teflon delegate for Etnaviv and Rocket (Rockchip) NPU support\n\nAll credits to Tomeu Vizoso, who did all the real work. This is simply a Docker image with the userspace pieces to make it easier to try out.\n\n## Why this?\n\nGetting the userspace pieces to try it out is slightly inconvenient, as one needs:\n- Recent mainline Mesa\n  - To get that building, one needs a recent Meson\n- Old Python 3.10 or 3.11, as Tensorflow Lite `tflite-runtime` only publishes prebuilt wheels for those versions\n\nThus, this Docker image, which bundles everything together, using a Bookworm base image and bookworm-backports for Meson.\n\nTensorflow Lite seems to be in-flux right now, so building it from source is not yet a goal, but might be in the future.\n\n## Get appropriate hardware and kernel\n\nYou'll need either\n\n- Board with Etnaviv NPU (All Amlogic A311D seem to have it: Khadas VIM3, LibreComputer Alta, Radxa Zero2...)\n  - You need a recent (6.16+) kernel, and the board's DT needs a `\u0026npu` node. \n    - Tomeu [already contributed the DT for Khadas VIM3 and LibreComputer Alta](https://github.com/torvalds/linux/commit/587c1c00f75565567d1f26a333a3392f7a21c28c) to mainline, they should be in 6.17+.\n    - See [this for Radxa Zero 2](https://github.com/armsurvivors/armbian-build/commit/85207b7c66d189514bdd9e0d38a6ddbcf9bb889a).\n  - Kernel built with `CONFIG_DRM_ETNAVIV`\n- Rockchip 3588 board\n  - _TODO_\n\n## Get Docker on the board\n\nRegular Debian Bookworm and/or Trixie should suffice.\n\n```shell\napt-get install docker.io docker-cli\n```\n\n## Pull this image\n\nIt's quite large (~1.2Gb) so pull it separately.\n\n```shell\ndocker pull ghcr.io/rpardini/mesa-teflon-etnaviv-rocket-docker:latest\n```\n\n## Run it\n\nRun it privileged (eg, as root:)\n\n```shell\ndocker run -it --privileged ghcr.io/rpardini/mesa-teflon-etnaviv-rocket-docker:latest\n```\n\n### Expected output, Etnaviv\n\nKernel dmesg:\n\n```\nroot@radxa-zero2:~# sudo dmesg --color=always | grep -i -e etnaviv\n[    4.346587] etnaviv etnaviv: bound ff100000.npu (ops gpu_ops [etnaviv])\n[    4.347782] etnaviv-gpu ff100000.npu: model: GC8000, revision: 7120\n[    4.353869] etnaviv-gpu ff100000.npu: etnaviv has been instantiated on a NPU, for which the UAPI is still experimental\n[    4.364904] [drm] Initialized etnaviv 1.4.0 for etnaviv on minor 1\n```\n\nRunning in Docker:\n\n```\nroot@radxa-zero2:~# docker run -it --privileged ghcr.io/rpardini/mesa-teflon-etnaviv-rocket-docker:latest\n+ cd /src/mesa\n+ TEFLON_DEBUG=verbose\n+ ETNA_MESA_DEBUG=ml_dbgs\n+ python3 src/gallium/frontends/teflon/tests/classification.py -i /src/mesa/grace_hopper.bmp -m src/gallium/targets/teflon/tests/models/mobilenetv1/mobilenet_v1_1_224_quant.tflite -l src/gallium/frontends/teflon/tests/labels_mobilenet_quant_v1_224.txt -e build/src/gallium/targets/teflon/libteflon.so\nLoading external delegate from build/src/gallium/targets/teflon/libteflon.so with args: {}\nTeflon delegate: loaded etnaviv driver\nidx    type ver support     inputs\n================================================================================================\n  0    CONV v1  supported   in: 88(u8) 8(u8) 6(i32) out: 7(u8)\n  1  DWCONV v1  supported   in: 7(u8) 35(u8) 34(i32) out: 33(u8)\n  2    CONV v1  supported   in: 33(u8) 38(u8) 36(i32) out: 37(u8)\n  3  DWCONV v1  supported   in: 37(u8) 41(u8) 40(i32) out: 39(u8)\n  4    CONV v1  supported   in: 39(u8) 44(u8) 42(i32) out: 43(u8)\n  5  DWCONV v1  supported   in: 43(u8) 47(u8) 46(i32) out: 45(u8)\n  6    CONV v1  supported   in: 45(u8) 50(u8) 48(i32) out: 49(u8)\n  7  DWCONV v1  supported   in: 49(u8) 53(u8) 52(i32) out: 51(u8)\n  8    CONV v1  supported   in: 51(u8) 56(u8) 54(i32) out: 55(u8)\n  9  DWCONV v1  supported   in: 55(u8) 59(u8) 58(i32) out: 57(u8)\n 10    CONV v1  supported   in: 57(u8) 62(u8) 60(i32) out: 61(u8)\n 11  DWCONV v1  supported   in: 61(u8) 65(u8) 64(i32) out: 63(u8)\n 12    CONV v1  supported   in: 63(u8) 68(u8) 66(i32) out: 67(u8)\n 13  DWCONV v1  supported   in: 67(u8) 71(u8) 70(i32) out: 69(u8)\n 14    CONV v1  supported   in: 69(u8) 74(u8) 72(i32) out: 73(u8)\n 15  DWCONV v1  supported   in: 73(u8) 77(u8) 76(i32) out: 75(u8)\n 16    CONV v1  supported   in: 75(u8) 80(u8) 78(i32) out: 79(u8)\n 17  DWCONV v1  supported   in: 79(u8) 83(u8) 82(i32) out: 81(u8)\n 18    CONV v1  supported   in: 81(u8) 86(u8) 84(i32) out: 85(u8)\n 19  DWCONV v1  supported   in: 85(u8) 11(u8) 10(i32) out: 9(u8)\n 20    CONV v1  supported   in: 9(u8) 14(u8) 12(i32) out: 13(u8)\n 21  DWCONV v1  supported   in: 13(u8) 17(u8) 16(i32) out: 15(u8)\n 22    CONV v1  supported   in: 15(u8) 20(u8) 18(i32) out: 19(u8)\n 23  DWCONV v1  supported   in: 19(u8) 23(u8) 22(i32) out: 21(u8)\n 24    CONV v1  supported   in: 21(u8) 26(u8) 24(i32) out: 25(u8)\n 25  DWCONV v1  supported   in: 25(u8) 29(u8) 28(i32) out: 27(u8)\n 26    CONV v1  supported   in: 27(u8) 32(u8) 30(i32) out: 31(u8)\n 27 AVGPOOL v1  unsupported in: 31(u8) out: 0(u8)\n 28    CONV v1  supported   in: 0(u8) 3(u8) 2(i32) out: 1(u8)\n 29 RESHAPE v1  supported   in: 1(u8) 5(i32) out: 4(u8)\n 30 SOFTMAX v1  unsupported in: 4(u8) out: 87(u8)\n\nteflon: compiling graph: 89 tensors 27 operations\nidx scale     zp has_data size\n=======================================\n  0 0.023528   0 no       1x1x1x1024\n  1 0.166099  42 no       1x1x1x1001\n  2 0.000117   0 yes      1x1x1x1001\n  3 0.004987  4a yes      1001x1x1x1024\n  4 0.166099  42 no       1x1x1x1001\n  5 0.000000   0 yes      1x1x1x2\n  6 0.000171   0 yes      1x1x1x32\n  7 0.023528   0 no       1x112x112x32\n  8 0.021827  97 yes      32x3x3x3\n  9 0.023528   0 no       1x14x14x512\n 10 0.000572   0 yes      1x1x1x512\n 11 0.024329  86 yes      1x3x3x512\n 12 0.000227   0 yes      1x1x1x512\n 13 0.023528   0 no       1x14x14x512\n 14 0.009659  63 yes      512x1x1x512\n 15 0.023528   0 no       1x14x14x512\n 16 0.000456   0 yes      1x1x1x512\n 17 0.019367  6a yes      1x3x3x512\n 18 0.000128   0 yes      1x1x1x512\n 19 0.023528   0 no       1x14x14x512\n 20 0.005447  99 yes      512x1x1x512\n 21 0.023528   0 no       1x7x7x512\n 22 0.000184   0 yes      1x1x1x512\n 23 0.007836  7e yes      1x3x3x512\n 24 0.000192   0 yes      1x1x1x1024\n 25 0.023528   0 no       1x7x7x1024\n 26 0.008179  82 yes      1024x1x1x512\n 27 0.023528   0 no       1x7x7x1024\n 28 0.002969   0 yes      1x1x1x1024\n 29 0.126169  d3 yes      1x3x3x1024\n 30 0.000425   0 yes      1x1x1x1024\n 31 0.023528   0 no       1x7x7x1024\n 32 0.018048  5f yes      1024x1x1x1024\n 33 0.023528   0 no       1x112x112x32\n 34 0.006875   0 yes      1x1x1x32\n 35 0.292199  6e yes      1x3x3x32\n 36 0.000716   0 yes      1x1x1x64\n 37 0.023528   0 no       1x112x112x64\n 38 0.030421  79 yes      64x1x1x32\n 39 0.023528   0 no       1x56x56x64\n 40 0.009477   0 yes      1x1x1x64\n 41 0.402773  82 yes      1x3x3x64\n 42 0.000356   0 yes      1x1x1x128\n 43 0.023528   0 no       1x56x56x128\n 44 0.015148  68 yes      128x1x1x64\n 45 0.023528   0 no       1x56x56x128\n 46 0.001424   0 yes      1x1x1x128\n 47 0.060537  a0 yes      1x3x3x128\n 48 0.000324   0 yes      1x1x1x128\n 49 0.023528   0 no       1x56x56x128\n 50 0.013755  5e yes      128x1x1x128\n 51 0.023528   0 no       1x28x28x128\n 52 0.000394   0 yes      1x1x1x128\n 53 0.016758  7b yes      1x3x3x128\n 54 0.000179   0 yes      1x1x1x256\n 55 0.023528   0 no       1x28x28x256\n 56 0.007602  97 yes      256x1x1x128\n 57 0.023528   0 no       1x28x28x256\n 58 0.000966   0 yes      1x1x1x256\n 59 0.041055  81 yes      1x3x3x256\n 60 0.000151   0 yes      1x1x1x256\n 61 0.023528   0 no       1x28x28x256\n 62 0.006432  7a yes      256x1x1x256\n 63 0.023528   0 no       1x14x14x256\n 64 0.000317   0 yes      1x1x1x256\n 65 0.013461  7a yes      1x3x3x256\n 66 0.000216   0 yes      1x1x1x512\n 67 0.023528   0 no       1x14x14x512\n 68 0.009171  6d yes      512x1x1x256\n 69 0.023528   0 no       1x14x14x512\n 70 0.000869   0 yes      1x1x1x512\n 71 0.036935  84 yes      1x3x3x512\n 72 0.000125   0 yes      1x1x1x512\n 73 0.023528   0 no       1x14x14x512\n 74 0.005300  8c yes      512x1x1x512\n 75 0.023528   0 no       1x14x14x512\n 76 0.001003   0 yes      1x1x1x512\n 77 0.042610  5e yes      1x3x3x512\n 78 0.000117   0 yes      1x1x1x512\n 79 0.023528   0 no       1x14x14x512\n 80 0.004963  7f yes      512x1x1x512\n 81 0.023528   0 no       1x14x14x512\n 82 0.000667   0 yes      1x1x1x512\n 83 0.028359  7f yes      1x3x3x512\n 84 0.000183   0 yes      1x1x1x512\n 85 0.023528   0 no       1x14x14x512\n 86 0.007771  59 yes      512x1x1x512\n 87 0.003906   0 no       1x1x1x1001\n 88 0.007812  80 no       1x224x224x3\n\nidx type                      inputs                   outputs  operation type-specific\n================================================================================================\n  0 CONV   88,8,6 7\n  1 DWCONV 7,35,34 33\n  2 CONV   33,38,36 37\n  3 DWCONV 37,41,40 39\n  4 CONV   39,44,42 43\n  5 DWCONV 43,47,46 45\n  6 CONV   45,50,48 49\n  7 DWCONV 49,53,52 51\n  8 CONV   51,56,54 55\n  9 DWCONV 55,59,58 57\n 10 CONV   57,62,60 61\n 11 DWCONV 61,65,64 63\n 12 CONV   63,68,66 67\n 13 DWCONV 67,71,70 69\n 14 CONV   69,74,72 73\n 15 DWCONV 73,77,76 75\n 16 CONV   75,80,78 79\n 17 DWCONV 79,83,82 81\n 18 CONV   81,86,84 85\n 19 DWCONV 85,11,10 9\n 20 CONV   9,14,12 13\n 21 DWCONV 13,17,16 15\n 22 CONV   15,20,18 19\n 23 DWCONV 19,23,22 21\n 24 CONV   21,26,24 25\n 25 DWCONV 25,29,28 27\n 26 CONV   27,32,30 31\n\nteflon: compiled graph, took 17093 ms\n\nteflon: compiling graph: 89 tensors 2 operations\nidx scale     zp has_data size\n=======================================\n  0 0.023528   0 no       1x1x1x1024\n  1 0.166099  42 no       1x1x1x1001\n  2 0.000117   0 yes      1x1x1x1001\n  3 0.004987  4a yes      1001x1x1x1024\n  4 0.166099  42 no       1x1x1x1001\n  5 0.000000   0 yes      1x1x1x2\n  6 0.000171   0 yes      1x1x1x32\n  7 0.023528   0 no       1x112x112x32\n  8 0.021827  97 yes      32x3x3x3\n  9 0.023528   0 no       1x14x14x512\n 10 0.000572   0 yes      1x1x1x512\n 11 0.024329  86 yes      1x3x3x512\n 12 0.000227   0 yes      1x1x1x512\n 13 0.023528   0 no       1x14x14x512\n 14 0.009659  63 yes      512x1x1x512\n 15 0.023528   0 no       1x14x14x512\n 16 0.000456   0 yes      1x1x1x512\n 17 0.019367  6a yes      1x3x3x512\n 18 0.000128   0 yes      1x1x1x512\n 19 0.023528   0 no       1x14x14x512\n 20 0.005447  99 yes      512x1x1x512\n 21 0.023528   0 no       1x7x7x512\n 22 0.000184   0 yes      1x1x1x512\n 23 0.007836  7e yes      1x3x3x512\n 24 0.000192   0 yes      1x1x1x1024\n 25 0.023528   0 no       1x7x7x1024\n 26 0.008179  82 yes      1024x1x1x512\n 27 0.023528   0 no       1x7x7x1024\n 28 0.002969   0 yes      1x1x1x1024\n 29 0.126169  d3 yes      1x3x3x1024\n 30 0.000425   0 yes      1x1x1x1024\n 31 0.023528   0 no       1x7x7x1024\n 32 0.018048  5f yes      1024x1x1x1024\n 33 0.023528   0 no       1x112x112x32\n 34 0.006875   0 yes      1x1x1x32\n 35 0.292199  6e yes      1x3x3x32\n 36 0.000716   0 yes      1x1x1x64\n 37 0.023528   0 no       1x112x112x64\n 38 0.030421  79 yes      64x1x1x32\n 39 0.023528   0 no       1x56x56x64\n 40 0.009477   0 yes      1x1x1x64\n 41 0.402773  82 yes      1x3x3x64\n 42 0.000356   0 yes      1x1x1x128\n 43 0.023528   0 no       1x56x56x128\n 44 0.015148  68 yes      128x1x1x64\n 45 0.023528   0 no       1x56x56x128\n 46 0.001424   0 yes      1x1x1x128\n 47 0.060537  a0 yes      1x3x3x128\n 48 0.000324   0 yes      1x1x1x128\n 49 0.023528   0 no       1x56x56x128\n 50 0.013755  5e yes      128x1x1x128\n 51 0.023528   0 no       1x28x28x128\n 52 0.000394   0 yes      1x1x1x128\n 53 0.016758  7b yes      1x3x3x128\n 54 0.000179   0 yes      1x1x1x256\n 55 0.023528   0 no       1x28x28x256\n 56 0.007602  97 yes      256x1x1x128\n 57 0.023528   0 no       1x28x28x256\n 58 0.000966   0 yes      1x1x1x256\n 59 0.041055  81 yes      1x3x3x256\n 60 0.000151   0 yes      1x1x1x256\n 61 0.023528   0 no       1x28x28x256\n 62 0.006432  7a yes      256x1x1x256\n 63 0.023528   0 no       1x14x14x256\n 64 0.000317   0 yes      1x1x1x256\n 65 0.013461  7a yes      1x3x3x256\n 66 0.000216   0 yes      1x1x1x512\n 67 0.023528   0 no       1x14x14x512\n 68 0.009171  6d yes      512x1x1x256\n 69 0.023528   0 no       1x14x14x512\n 70 0.000869   0 yes      1x1x1x512\n 71 0.036935  84 yes      1x3x3x512\n 72 0.000125   0 yes      1x1x1x512\n 73 0.023528   0 no       1x14x14x512\n 74 0.005300  8c yes      512x1x1x512\n 75 0.023528   0 no       1x14x14x512\n 76 0.001003   0 yes      1x1x1x512\n 77 0.042610  5e yes      1x3x3x512\n 78 0.000117   0 yes      1x1x1x512\n 79 0.023528   0 no       1x14x14x512\n 80 0.004963  7f yes      512x1x1x512\n 81 0.023528   0 no       1x14x14x512\n 82 0.000667   0 yes      1x1x1x512\n 83 0.028359  7f yes      1x3x3x512\n 84 0.000183   0 yes      1x1x1x512\n 85 0.023528   0 no       1x14x14x512\n 86 0.007771  59 yes      512x1x1x512\n 87 0.003906   0 no       1x1x1x1001\n 88 0.007812  80 no       1x224x224x3\n\nidx type                      inputs                   outputs  operation type-specific\n================================================================================================\n  0 CONV   0,3,2 1\n  1 RESHAPE 1,5 4\n\nteflon: compiled graph, took 281 ms\nteflon: invoked graph, took 7 ms\nteflon: invoked graph, took 0 ms\nteflon: invoked graph, took 7 ms\nteflon: invoked graph, took 1 ms\nteflon: invoked graph, took 6 ms\nteflon: invoked graph, took 1 ms\nteflon: invoked graph, took 6 ms\nteflon: invoked graph, took 1 ms\nteflon: invoked graph, took 6 ms\nteflon: invoked graph, took 1 ms\n0.866667: military uniform\n0.031373: Windsor tie\n0.015686: mortarboard\n0.007843: bow tie\n0.007843: academic gown\ntime: 7.102ms\n```\n\n### Expected output, Rocket (Rockchip)\n\n_TODO_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpardini%2Fmesa-teflon-etnaviv-rocket-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpardini%2Fmesa-teflon-etnaviv-rocket-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpardini%2Fmesa-teflon-etnaviv-rocket-docker/lists"}