I am able to ssh to a docker container running on a remote server. The container has no access to the internet.
Request: I want to set up my deep leaning environment in the container.
Things I can do now Data transfer between my host and the docker container is fast.
Things I do not know how to
- Using conda to install packages.
- Using pip to install packages.
Immature solution Using conda proxy to install packages directly inside the docker container. I do not know how to forward the http/https request through ssh tunnel from the docker container to the destination.
I think it might be:
- First configure proxy server for conda throught modifying
~/.condarc
as
proxy_servers:
http: http://localhost:9998
https: https://localhost:9998
- Then ssh from my PC to the container using command like:
ssh -p port kd@mlp -R 9998:someIP:80
I tried to replace someIP with localhost or https://repo.anaconda.com/pkgs/main. None of both helps.
Is the above solution possible? What would the ssh command be look like?
Noticed that:
- Since there are some packages not provided by pip, conda is necessary.
- I have no access to the remote host and am only able to ssh to the docker container.
- I can not modify the docker image or relaunch the docker container.
update:
- There are some ways to install packages offline. However, they are not good solutions since this means I have to manually download conda/pip packages and transfer them to the corresponding docker. And I have to mannually deal with each environment. It is hoped that some solutons could setup ssh tunnel so that my conda would access the internet.