jupyter-tabnine icon indicating copy to clipboard operation
jupyter-tabnine copied to clipboard

Docker image

Open Prabhusarathy18 opened this issue 4 years ago • 8 comments

Please check for Dockerized build. Facing multiple issues while creating image and also while docker run.

Prabhusarathy18 avatar Nov 25 '20 07:11 Prabhusarathy18

Please refer to https://github.com/wenmin-wu/jupyter-tabnine/blob/master/README.md#build-server-image, do let me know if you have any other problems.

wenmin-wu avatar Nov 28 '20 17:11 wenmin-wu

Thanks for response. Now the image build is very fine. I'm getting CORS issues while specifying remote_server_url in the config file. Is there any fix for this? @wenmin-wu

Prabhusarathy18 avatar Dec 03 '20 15:12 Prabhusarathy18

Did you modify the code? The CORS issue had been solved here https://github.com/wenmin-wu/jupyter-tabnine/blob/master/go/cmd/server.go#L33

wenmin-wu avatar Dec 03 '20 17:12 wenmin-wu

@wenmin-wu Yes it is working now. But Im not getting any results now. I pointed the remote-url param as http://0.0.0.0:9999/. Also tried by hard-coding inside main.js file. To my understanding the ajax call is loading too long. May be network issue. Please check this once.

Also the image was taken from docker-hub. Also tried with build-script. Both fails for me.

Prabhusarathy18 avatar Dec 04 '20 12:12 Prabhusarathy18

Also tried with postman, http://0.0.0.0:9999/tabnine?data=%7B%22version%22%3A%221.0.7%22%2C%22request%22%3A%7B%22Autocomplete%22%3A%7B%22filename%22%3A%22%2FUntitled2044.py%22%2C%22before%22%3A%22i%22%2C%22after%22%3A%22%22%2C%22region_includes_beginning%22%3Atrue%2C%22region_includes_end%22%3Atrue%2C%22max_num_results%22%3A10%7D%7D%7D

It is not fetching any results.

Prabhusarathy18 avatar Dec 04 '20 14:12 Prabhusarathy18

Hi @Prabhusarathy18, it's caused by the TabNine binary refer to #60, could you please enter your container and check the TabNine version? I solved this by downloading an old version which is 2.9.2. Currently, you can hard code the version here https://github.com/wenmin-wu/jupyter-tabnine/blob/master/go/pkg/tabnine/tabnine.go#L193 as following:

latestVersion := strings.TrimSpace(string(body))
latestVersion = "2.9.2"
log.Printf("Latest version: %s\n", latestVersion)

It's better to add a parameter to allow users to skip upgrading, will do it when I have time.

wenmin-wu avatar Dec 06 '20 16:12 wenmin-wu

@wenmin-wu Using 2.9.2 version. Still facing same issue. The version was hardcoded in tabnine.go file. Also checked inside the container. Pls help

Prabhusarathy18 avatar Dec 07 '20 05:12 Prabhusarathy18

@wenmin-wu I think server inside the container is stopping. At first the container memory is 100+MB but after 10-15 sec it is under 10MB. So it is understood that some process inside the container is killed after 10-15sec. Also I checked with latest version of TabNine 3.2.28 which was specified #60. Please check this.

Prabhusarathy18 avatar Dec 07 '20 06:12 Prabhusarathy18