This is nothing banana specific but it’s so useful I thought it would be worth sharing. This is taken straight out of the docker-diffuser-api
’s CONTRIBUTING.md:
If you’re doing development around the S3 handling, it can be very useful to
have a local S3 server, especially due to the large size of models. You
can set one up like this:
$ docker run -p 9000:9000 -p 9001:9001 \
-v /usr/local/minio:/data quay.io/minio/minio \
server /data --console-address ":9001"
Now point a web browser to http://localhost:9001/, login with the default
root credentialsminioadmin:minioadmin
and create a bucket and credentials
for testing. More info at Docker Hub.Typical policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": "arn:aws:s3:::BUCKET_NAME/*"
}
]
}