vast-ai / vast-python

Vast.ai python and cli api client
MIT License
117 stars 44 forks source link

vast login not working #6

Closed tom-doerr closed 2 years ago

tom-doerr commented 3 years ago

The login command is not recognized

~/.local/bin $ ./vast login
usage: vast [-h] [--url URL] [--raw] [--api-key API_KEY] command ...

positional arguments:
  command            command to run. one of:
    help             print this help message
    search offers
    show instances
    show machines
    list machine
    unlist machine
    remove defjob
    start instance
    stop instance
    label instance
    destroy instance
    set defjob
    create instance
    change bid
    set min-bid
    set api-key
    create account
    login

optional arguments:
  -h, --help         show this help message and exit
  --url URL          server REST api url
  --raw              output machine-readable json
  --api-key API_KEY  api key. defaults to using the one stored in
                     ~/.vast_api_key
tom-doerr commented 3 years ago

I just tested it in a docker environment with a different python version.

echo 'FROM ubuntu:18.04\nRUN apt-get update && apt-get install -y python3 python3-pip wget\n run pip3 install requests\n run wget https://raw.githubusercontent.com/vast-ai/vast-python/master/vast.py -O vast; chmod +x vast;' |  docker build -t test -

In this test environment the login command works without any issue. Docker env python version: 3.6.9 My python version: 3.8.5

tom-doerr commented 3 years ago

Just tried it with python version 3.8.5 in the docker environment. Environment:

echo 'FROM ubuntu:20.04\nRUN apt-get update && apt-get install -y python3 python3-pip wget\n run pip3 install requests\n run wget https://raw.githubusercontent.com/vast-ai/vast-python/master/vast.py -O vast; chmod +x vast;' |  docker build -t test -

This works as well, so the python version is not the issue. It seems to be an issue related to my setup.

jsbcannell commented 2 years ago

The login command has been removed in favor of set api-key.