The link in this article no longer goes to PRB content, further the docker compose commands for PRB have been taken down.
https://wiki.phala.network/zh-cn/docs/prb/docker-compose-example/
Yeah, we’re rebuilding the wiki page, you can find the PRB part here Runtime Bridge 2.0 Release Note - Phala Network Wiki
Hello everyone
I want to convert solo mining file to PRB. I wasn’t able to do this.
step 1: sudo phala stop … ok
step 2: sudo mkdir ~/prb …ok
Step 3: Copy the docker-compse.yml and .env files to the /prb folder. The system did not allow me to copy normally using the cp command with sudo or sudo su. So I copied with " sudo nautilus ". the dependencies of the copied files persist.
Step 4: I deleted the node and pherry comments in the docker-compse.yml file with “sudo vim docker-compose.yml”. but the file is read-only so it wouldn’t let me change it. I saved the file with a different name. then I changed the contents of this file and renamed it docker-compose.yml. But the file dependencies are broken.
step 5 : I executed sudo docker-compose up -d command. i got an error message.
Error message :
WARNING: The PRUNTIME_IMAGE variable is not set. Defaulting to a blank string.
WARNING: The CORES variable is not set. Defaulting to a blank string.
WARNING: The PRUNTIME_VOLUMES variable is not set. Defaulting to a blank string.
WARNING: Found orphan containers (prb_pruntime_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Traceback (most recent call last):
File “docker-compose”, line 3, in
File “compose/cli/main.py”, line 81, in main
File “compose/cli/main.py”, line 203, in perform_command
File “compose/metrics/decorator.py”, line 18, in wrapper
File “compose/cli/main.py”, line 1186, in up
File “compose/cli/main.py”, line 1182, in up
File “compose/project.py”, line 664, in up
File “compose/service.py”, line 352, in ensure_image_exists
File “compose/service.py”, line 378, in image
File “docker/utils/decorators.py”, line 17, in wrapped
docker.errors.NullResource: Resource ID was not provided
[246031] Failed to execute script docker-compose
Hi rho!
I think you had checked this Wiki: How to switch from Solo mining to PRB mining - Phala Network Wiki
There is some background before you start:
- PRB will consist of two main parts, server and worker.
The server is responsible for running node and lifecycle (similar part to Pherry), thus providing data support for workers
The worker is responsible for providing computing power to the Network. It also repesents really worker on the chain - As mentioned above, different type of workers need to run many components
The server needs to run a node docker container and a series of dockers containers in PRB
Workers only need to run pRuntime
At present, only node and pruntime exist in the solo-mining workers, and lifecycle and other parts of PRB are missing
Therefore, if you need to convert solo into a server, you need to run a lot of things in this device, which involves a lot of knowledge, maybe you need to understand this content first: Deployment Guide for Latest Version - Phala Network Wiki
At the same time, after the server is running, it cannot provide computing power for the network, and you need other workers
If you already run a PRB server and just need to convert a solo into a worker, it will be easy, the wiki you’ve seen actually does this step. If it doesn’t work, you can try:
- Ensure that solo is installed normally, and start the scripts to make sure it work well by
sudo phala start
- Run the following two lines of commands to stop node and pherry in the solo worker, leaving only pruntime
sudo docker stop phala-pherry
sudo docker stop phala-node
- Config the API of this worker to the PRB server, the format of the API is: http://xxx.xxx.xxx.xxx:8000
xxx.xxx.xxx.xxx here means IP of the worker
Hello Doylegxd
Thank you very much for your answer. I’ve been looking for this information for days.
Turns out, while I was doing the right things, I was going in very wrong directions.
Normally I set up a PRB server. I’m waiting for it to sync. I misunderstood the explanations on the wiki, thinking that during this time I had to prepare my solo miners to add to this PRB server. I was trying to convert solo miners to prb. Now I understand that I have to stop the node and pherry in solo miner. I just have to run pruntime. and I have to connect this solo miner to PRB server with point https://192.168.1xx:8000.
Thank you again and again.