RD-Agent icon indicating copy to clipboard operation
RD-Agent copied to clipboard

Connection error to docker image

Open Hanson13 opened this issue 1 year ago • 1 comments

❓ Questions and Help

We sincerely suggest you to carefully read the documentation. After that, if you still feel puzzled, please describe the question clearly under this issue.

Perhaps due to the network limit of my institution, there reports connection error when I run the demo

rdagent fin_factor

Error

2024-10-11 16:51:41.222 | INFO     | rdagent.utils.env:prepare:193 - Building the image from dockerfile: /home/user/.conda/envs/rdagent/lib/python3.10/site-packages/rdagent/scenarios/qlib/docker
error: Get "https://registry-1.docker.io/v2/": dial tcp [128.121.243.76:443](http://128.121.243.76:443/): connect: connection refused

Is there any method to access and use offline docker images? Many thanks!

Hanson13 avatar Oct 11 '24 09:10 Hanson13

Hi, You can try some of the solutions mentioned in https://github.com/docker/cli/issues/2618 and see if they work.

TPLin22 avatar Oct 12 '24 05:10 TPLin22

Hi @TPLin22 , thanks for your kind reply! I tried the solutions in the link but it doesn't work. The cause of the problem should be at

            resp_stream = client.api.build(
                path=str(self.conf.dockerfile_folder_path), tag=self.conf.image, network_mode=self.conf.network
            )

And here is the parameters for self.conf

QlibDockerConf(build_from_dockerfile=True, \
dockerfile_folder_path=PosixPath('/home/user/.conda/envs/rdagent/lib/python3.10/site-packages/rdagent/scenarios/qlib/docker'), image='local_qlib:latest', mount_path='/workspace/qlib_workspace/', default_entry='qrun conf.yaml', extra_volumes={PosixPath('/home/jyh/.qlib'): '/root/.qlib/'}, \
network='bridge', shm_size='16g', enable_gpu=True)

I wonder if there are any other method to build docker image locally? Or any URL where I can download the built docker image on one another machine and transfer it to my working machine?

Thanks again!

Hanson13 avatar Oct 18 '24 09:10 Hanson13