code-kern-ai / refinery

The data scientist's open-source choice to scale, assess and maintain natural language data. Treat training data like a software artifact.
https://www.kern.ai
Apache License 2.0
1.39k stars 66 forks source link

Starting refinery raises KeyError #248

Closed krlng closed 1 year ago

krlng commented 1 year ago

Describe the bug Basically I only installed refinery and tried to start it. I got:

>> refinery start
v1.8.0: Pulling from kernai/alfred
Digest: sha256:15fc59b24103ea7e9bebcbf08df1a76fb269778ed54331d320e3f173eaaaf0f1
Status: Image is up to date for kernai/alfred:v1.8.0
docker.io/kernai/alfred:v1.8.0
def7b07916655d70d9b27d3888001b4b611a9cbe0b30f89fade86dc2dc05afe5
Creating docker-compose.yml file...
Traceback (most recent call last):
  File "/program/start.py", line 31, in <module>
    process_docker_compose_template(refinery_dir, minio_endpoint)
  File "/program/util/template_processor.py", line 17, in process_docker_compose_template
    credential_ip = get_credential_ip()
  File "/program/util/docker_helper.py", line 56, in get_credential_ip
    return network.attrs["IPAM"]["Config"][0]["Gateway"]
KeyError: 'Gateway'

To Reproduce Install kern-refinery==1.3.0 and run refinery start

Desktop (please complete the following information): Apple M2 Max, macOS 13.3.1

JWittmeyer commented 1 year ago

Hi @krlng,

thanks for reaching out. We noticed a similar issue with a different user just recently. There seems to be an issue with the collection of the necessary network address right after the installation (usually because the docker network couldn't be initialized correctly).

The final solution was to restart the computer.

If that doesn't help could you provide the results of the command docker network inspect bridge

JWittmeyer commented 1 year ago

Any update @krlng ?

JWittmeyer commented 1 year ago

Reopen if the error still occurs