How can I use Tabnine in a DevContainer?

687 Views Asked by At

I've been regularly using the Tabnine VSCode extension on my computer for a while now, and it's been very helpful so far. However, I'm having trouble installing it inside a DevContainer.

Outside the DevContainer, Tabnine works perfectly fine. On the other hand, although I've installed Tabnine as an extension in the DevContainer, inside the DevContainer there are no suggestions being made, typing tabnine::config does nothing, and there's no TabNine icon in the Activity Bar.

I've tried adding port forwarding to port 5555, but VSCode automatically changes it to port 5556, and it doesn't fix the issue.

Is there anything I can do to get TabNine working in my DevContainer? I'm still very much a beginner, so I apologize if I'm missing something obvious.

2

There are 2 best solutions below

4
ikhvjs On

You don't need to install Tabnine extension in the devcontainer. Only install it in the Host instance and the devcontainer will auto do the port forwarding for you.

Tested with version of Tabnine v3.5.45

0
poisongas On

If you are using M1 chip then try to force build docker image with flag "--platform linux/amd64". Tabnine will run just fine