Closed sdkparkforbi closed 1 year ago
Make sure the bareun server is running on "localhost:5655"
I can check server is working.
@sdkparkforbi Sorry, you should run the server with docker version. Docker version only support http REST API through envoyproxy.
We will update our document for this repo.
@sdkparkforbi In addition, Docker versions are currently only available for Linux and Windows OS.
@sdkparkforbi
I`m sorry. For 'server', you only need to enter the "server name" or "server address".
NOT server <- "http://localhost:5655"
JUST server <- "localhost"
Thank you for your kind and detailed explanation. In Python, coding as below works well, but why do I need to run a server using Docker in R? Since I am in a position to study Docker, I want to know exactly why.
I solved it by installing windows docker. Thank you for help.
I summarized the two documents below and organized them into 14 steps. https://www.lainyzine.com/ko/article/a-complete-guide-to-how-to-install-docker-desktop-on-windows-10/ https://docs.bareun.ai/install/docker/#_2
Run Command Prompt in Administrator Mode
wsl (windows subsystem for linux) installation
wsl --install
If you find installation error above, you can execute the following two commands
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart wsl --update
Changed WSL version to 2
wsl --set-default-version 2
Confirm that both commands have ended with the output of ‘completed’ and reboot Windows
After the Ubuntu installation screen appears, if an ID is requested, an ID is created and entered, and if a password is requested, a password is created.
Download and run the latest WSL2 Linux kernel update package for x64 machine from the link below https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
Go to the link below and download Docker Desktop for Windows https://www.docker.com/products/docker-desktop/
Setup by running Docker Desktop Installer.exe
Run the Docker Desktop icon
Run Command Prompt in Administrator Mode
Install bareun using Docker command
docker pull bareunai/bareun:latest
Run server
docker run -d --restart unless-stopped --name bareun -p 5757:5757 -p 9902:9902 -v ~/bareun/var:/bareun/var bareunai/bareun:latest
Register API Key
docker exec bareun /bareun/bin/bareun -reg [your own API Key]
Thank you for your kind and detailed explanation. In Python, coding as below works well, but why do I need to run a server using Docker in R? Since I am in a position to study Docker, I want to know exactly why.
@sdkparkforbi
Bareun runs as a server that supports grpc as its primary transport protocol. At first we tried to support grpc in bareun client R version, but it took too much dependency. So we decided to use the HTTP protocol in the R version. HTTP has been implemented in a way that uses an envoy proxy, which is supported only by Docker.
It takes some hacking to support grpc in R. We also know how to help you eliminate dependencies as well. But I'm always running out of time.
Thank you for your question.
@sdkparkforbi
I summarized the two documents below and organized them into 14 steps. https://www.lainyzine.com/en/article/a-complete-guide-to-how-to-install-docker-desktop-on-windows-10/#google_vignette https://docs.bareun.ai/install/docker/#_2
- Run Command Prompt in Administrator Mode
- wsl (windows subsystem for linux) installation
wsl --install
- Changed WSL version to 2
wsl --set-default-version 2
- Execute the following two commands
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- Confirm that both commands have ended with the output of ‘completed’ and reboot Windows
- After the Ubuntu installation screen appears, if an ID is requested, an ID is created and entered, and if a password is requested, a password is created.
- Download and run the latest WSL2 Linux kernel update package for x64 machine from the link below https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
- Go to the link below and download Docker Desktop for Windows https://www.docker.com/products/docker-desktop/
- Setup by running Docker Desktop Installer.exe
- Run the Docker Desktop icon
- Run Command Prompt in Administrator Mode
- Install bareun using Docker command
docker pull bareunai/bareun:latest
- Run server
docker run -d --restart unless-stopped --name bareun -p 5757:5757 -p 9902:9902 -v ~/bareun/var:/bareun/var bareunai/bareun:latest
- Register API Key
docker exec bareun /bareun/bin/bareun -reg [your own API Key]
Great. We will update our document on this. Also We will refer it too. Thanks.
If the program is run as below, a curl-related error occurs in pos(). It's hard to find the reason. Can someone look for a solution?
library(curl) library(httr) library(rjson) library(bareun)
apikey <- "XXXXXXXXXXXXXXXXXXXXXXXX" # API-Key server <- "http://localhost:5655" set_api(apikey, server) t <- tagger()
text <- "밤은 밤이다."
pos(t, text)
The result shows like;
Error in curl::curl_fetch_memory(URL, handle = handle) : Could not resolve host: http