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

Self-host https://assets.cml.dev #291

Closed
JamesMowatt opened this issue Oct 6, 2020 · 7 comments · Fixed by #1075
Closed

Self-host https://assets.cml.dev #291

JamesMowatt opened this issue Oct 6, 2020 · 7 comments · Fixed by #1075
Assignees
Labels
cml-publish Subcommand external-request You asked, we did

Comments

@JamesMowatt
Copy link
Contributor

Is it possible to self-host https://assets.cml.dev

I am a little uncomfortable with the idea that this will upload files to a third-party server.

If it isn't something that can be self-hosted I am happy to raise a PR to support GS/S3.

@JamesMowatt JamesMowatt changed the title https://assets.cml.dev self-hosted Self-host https://assets.cml.dev Oct 6, 2020
@dmpetrov
Copy link
Member

dmpetrov commented Oct 6, 2020

@JamesMowatt CML has no limitations on image hosting. you just need to replace cml-publish command with image uploading code and output the URL to a report. We develop the assets.cml.dev (using S3 and AWS Lambda) just to simplify this process.

You can try to use your own S3 bucket (you will need to set permissions correctly) or some external image hosting services: https://stackoverflow.com/questions/2642570/whats-a-good-image-hosting-site-with-an-api-to-allow-me-upload-images-from-my-w

If you use AWS we can even consider sharing assets.cml.dev source code with you. It can be even open-sourced at some point.

What would be an ideal solution for you?

@tmaier
Copy link

tmaier commented Oct 8, 2020

Instead of uploading the image somewhere, you may consider to store the image encoded with base64 in the markdown file directly.
See https://superuser.com/questions/1199393/is-it-possible-to-directly-embed-an-image-into-a-markdown-document

@dmpetrov
Copy link
Member

dmpetrov commented Oct 9, 2020

@tmaier unfortunately, embedded (base64) images are not supported in GitHub md files: github/markup#270 (comment) This is why we decided to use a unified approach to publishing images.

Does GitLab support base64 images? We can probably implement a special option or a command for GitLab. @DavidGOrtega do you know?

@0x2b3bfa0
Copy link
Member

@cateseale
Copy link

If you use AWS we can even consider sharing assets.cml.dev source code with you. It can be even open-sourced at some point.

@dmpetrov was this opened-sourced in the end? I'd like to be able to use our own (non-public) S3 buckets with cml publish.

@dacbd
Copy link
Contributor

dacbd commented Jun 24, 2022

Going to keep this issue until we release some instructions for a way to easier self-host the images, but we have added a URL option to cml publish so with the next release you can export CML_PUBLISH_URL="https://images.mydomain.com/"; cml publish ./plot.png as well as cml publish --url="https://images.mydomain.com/" ./plot.png

@casperdcl
Copy link
Contributor

closing in favour of iterative/cml.dev#266 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cml-publish Subcommand external-request You asked, we did
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants