Document how to configure dstack on WSL
When trying to configure in a Linux (e.g. Ubuntu) instance in WSL (Windows Subsystem for Linux, in particular WSLg) config cannot find the AWS credentials in the windows path
eafpres@LAPTOP-JSLJ8BRD:/mnt/c/eaf llc/aa-analytics and bi/dstack$ dstack config --aws-profile default
? Choose AWS region Use arrows to move, type to filter
✓ US East, N. Virginia [us-east-1]
? Enter S3 bucket name: eaf-test-dstack
Traceback (most recent call last):
File "/home/eafpres/.local/bin/dstack", line 8, in <module>
sys.exit(main())
File "/home/eafpres/.local/lib/python3.9/site-packages/dstack/cli/main.py", line 77, in main
args.func(args)
File "/home/eafpres/.local/lib/python3.9/site-packages/dstack/cli/config.py", line 105, in config_func
bucket_name = ask_bucket(profile_name, region_name, default_bucket_name, default_subnet_id)
File "/home/eafpres/.local/lib/python3.9/site-packages/dstack/cli/config.py", line 150, in ask_bucket
return ask_bucket_name(profile_name, region_name, default_bucket_name, default_subnet_id)
File "/home/eafpres/.local/lib/python3.9/site-packages/dstack/cli/config.py", line 161, in ask_bucket_name
if backend.validate_bucket():
File "/home/eafpres/.local/lib/python3.9/site-packages/dstack/aws/__init__.py", line 45, in validate_bucket
return config.validate_bucket(self._s3_client(), self.backend_config.bucket_name,
File "/home/eafpres/.local/lib/python3.9/site-packages/dstack/aws/config.py", line 34, in validate_bucket
raise e
File "/home/eafpres/.local/lib/python3.9/site-packages/dstack/aws/config.py", line 12, in validate_bucket
response = s3_client.head_bucket(Bucket=bucket_name)
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/client.py", line 508, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/client.py", line 898, in _make_api_call
http, parsed_response = self._make_request(
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/client.py", line 921, in _make_request
return self._endpoint.make_request(operation_model, request_dict)
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/endpoint.py", line 119, in make_request
return self._send_request(request_dict, operation_model)
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/endpoint.py", line 198, in _send_request
request = self.create_request(request_dict, operation_model)
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/endpoint.py", line 134, in create_request
self._event_emitter.emit(
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/hooks.py", line 412, in emit
return self._emitter.emit(aliased_event_name, **kwargs)
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/hooks.py", line 256, in emit
return self._emit(event_name, kwargs)
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/hooks.py", line 239, in _emit
response = handler(**kwargs)
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/signers.py", line 103, in handler
return self.sign(operation_name, request)
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/signers.py", line 187, in sign
auth.add_auth(request)
File "/home/eafpres/.local/lib/python3.9/site-packages/botocore/auth.py", line 407, in add_auth
raise NoCredentialsError()
botocore.exceptions.NoCredentialsError: Unable to locate credentials
Perhaps a note can be added to the docs:
This can be accommodated by exporting two env variables:
export AWS_SHARED_CREDENTIALS_FILE=/mnt/c/Users/
these can be added into the .bashrc
either
~/.bashrc or
/etc/bash.bashrc
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.