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

Docker to only serve the app and download images without using S3? #60

Open
maxime1992 opened this issue Oct 27, 2023 · 6 comments
Open
Labels
question Further information is requested

Comments

@maxime1992
Copy link

Hello,

has anybody created a docker container that'd let us spawn a container that'd serve the frontend in a very basic way and let us upload images then download them through the interface without using S3 in between? Just on disk or in memory and as soon as it's downloaded the image would be removed from the server?

@tsibg
Copy link

tsibg commented Oct 28, 2023

Not sure if it will help you, but I'm also playing around with this use-case - user can select an image and get the result. However, processing it only on the frontend.
So NO Docker and without backend, no S3, no file management. Just a simple React App, based on the example.

Check it if it works for you: https://github.com/tsibg/react-background-remover
Still WIP, but works as a standalone - hosted preview https://react-background-remover-seven.vercel.app/

React is easy to build into static files to be hosted, so I decided to not complicate it with Docker, as I will not need Backend or server-processing for my exact project.

@maxime1992
Copy link
Author

Love the idea, that's great 🔥!

@perroudsky
Copy link

@tsibg nice!
Do you think the lib could work in react-native ?

@tsibg
Copy link

tsibg commented Nov 1, 2023

@tsibg nice! Do you think the lib could work in react-native ?

I believe someone from the imgly team or repository maintainers would be able to answer you more accurately.
Why don't you open new issue to ask as it gets out of scope of this one.

P.s. Just out of curiosity: I just scrolled around the repo code and it seems like they are using onnxruntime-web for Web, and other npm package for Node. So, you could try with onnxruntime-react-native ;) Check packages/web/src/onnx.ts.

@perroudsky
Copy link

Indeed I should ! Thanks man

@DanielHauschildt
Copy link
Contributor

@maxime1992 You should be able to build a docker image and serve the assets from within the docker image easily. You have to copy the assets locally to the public directory and serve them locally:

https://github.com/imgly/background-removal-js/tree/main/packages/web#custom-asset-serving

@DanielHauschildt DanielHauschildt added the question Further information is requested label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants