Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run scripts (code stuck on docker container creation) #62

Closed
Phan-Tom416 opened this issue Feb 15, 2023 · 8 comments
Closed

Cannot run scripts (code stuck on docker container creation) #62

Phan-Tom416 opened this issue Feb 15, 2023 · 8 comments

Comments

@Phan-Tom416
Copy link

Hi,

I was trying to run the example code to test out the installation on Windows 11 system:
diambra run -r D:\RL python diambra_arena_gist.py

However the code get stuck after creating the container in docker, after this output:
service is listening on port 0.0.0.0:xxxxx

How can I fix this issue?

Thanks

@alexpalms
Copy link
Member

Hi @Phan-Tom416,

a few questions:

  1. Which terminal are you using?
  2. Are you using a virtual env? If yes, which one?
  3. Can you share here the pip list output?
  4. Have you downloaded and verified the roms?

It can be easier if you reach out on discord https://discord.gg/tFDS2UN5sv to iterate or schedule a call.

@Phan-Tom416
Copy link
Author

Phan-Tom416 commented Feb 15, 2023

Hi @alexpalms,

Answering each question:

  1. I am using Windows PowerShell, also tried with Command Prompt.
  2. Not using virtual environment.
  3. Pasting the output of pip list below:

Package Version


anaconda 0.0.1.1
async-generator 1.10
attrs 21.2.0
certifi 2021.10.8
cffi 1.15.0
cloudpickle 2.2.1
colorama 0.4.4
cryptography 35.0.0
cycler 0.11.0
dacite 1.8.0
diambra 0.0.11
diambra-arena 2.1.0rc4
diambra-engine 2.1.0rc7
distro 1.8.0
findspark 2.0.1
fonttools 4.28.3
grpcio 1.51.1
gym 0.21.0
h11 0.12.0
idna 3.3
inputs 0.5
kiwisolver 1.3.2
lxml 4.6.4
MAMEToolkit 1.1.0
matplotlib 3.5.0
mysql 0.0.3
mysqlclient 2.1.0
numpy 1.21.4
opencv-python 4.5.4.60
outcome 1.1.0
packaging 21.3
pandas 1.3.4
Pillow 8.4.0
pip 22.0.3
protobuf 3.20.3
py4j 0.10.9.3
pycparser 2.21
pyOpenSSL 21.0.0
pyparsing 3.0.6
pyspark 3.2.1
python-dateutil 2.8.2
pytils 0.3
pytz 2021.3
PyYAML 6.0
scipy 1.7.2
screeninfo 0.8.1
selenium 4.0.0
setuptools 57.4.0
setuptools-scm 6.3.2
six 1.16.0
sniffio 1.2.0
sortedcontainers 2.4.0
spark 0.2.1
tk 0.1.0
tomli 1.2.2
tools 0.1.9
tqdm 4.62.3
trio 0.19.0
trio-websocket 0.9.2
urllib3 1.26.7
wheel 0.37.1
wsproto 1.0.0

  1. I have the roms ready and checked with no issue.

Thanks

@alexpalms
Copy link
Member

Thank you for the feedback @Phan-Tom416
All seems normal. The best thing is to jump in a call and take a look together.
Please reach out to me on Discord and we will schedule a call.

@alexpalms
Copy link
Member

A few additional questions @Phan-Tom416 :

  1. How long have you waited for the script to start? It can take a while
  2. Are you sure docker has the proper permissions on Win?

@discordianfish
Copy link
Member

This seems to be a docker-for-win issue with the portmapping, we did the following already to isolate the issue:

  • Run docker run -p 80:80 nginx -> Reachable on localhost:80
  • Run docker run -p 127.0.0.1:80:80 nginx -> Unreachable
  • Run engine with net=host without cli as described here and...
    • Connect to localhost:50051 -> failed
    • Connect to host.docker.internal:50051: 192.168.101.23:50051: connectex: No connection could be made because the target machine actively refused it.
  • diambra run --env.host=0.0.0.0 and..
    • grpcurl -plaintext 172.17.0.3:50051 list: Failed to dial target host "172.17.0.3:50051": context deadline exceeded
    • grpcurl -plaintext localhost:59667 list: Failed to dial target host "localhost:59667": dial tcp [::1]:59667: connectex: No connection could be made because the target machine actively refused it."
    • grpcurl -plaintext host.docker.internal:59667 list: Failed to dial target host "host.docker.internal:59667": dial tcp 192.168.101.23:59667: connectex: No connection could be made because the target machine actively refused it.
  • diambra test diambra/agent-random-1:main -> works!
  • Manually connect to grpc from container as described here

@alexpalms
Copy link
Member

Do you have any update on this @Phan-Tom416 ?

@discordianfish
Copy link
Member

Since docker isn't responding to the issue filled, the best option is to use a linux VM. Alternatively you could try using podman: https://podman.io/docs/installation but you might need to configure it to use the default docker socket location until we support that officially in the cli.

@alexpalms
Copy link
Member

Closing the issue for inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants