Custom Dockerfile

How can I add a custom Dockerfile and let know Huggingface Spaces that I want to use that Dockerfile instead of the one it uses as default?

My repository is this one, where you will find the Dockerfile and the Readme where the configuration of the SDK is (I tried removing this thinking that Spaces would then start using my Dockerfile, but it doesn’t, it gives a config error)

Any help is welcome! Thank you in advance!

1 Like

hi @ugaray96 we’re currently working to support Dockerfile :raised_hands: it will come soon!
I see you have you’re demo already running here Neural Search Demo - a Hugging Face Space by ugaray96 is there anything on our base streamlit sdk that doesn’t work for you?

1 Like

Hi @radames ! Thanks for answering so quickly!
My demo is perfectly running. All this comes because I want to be able to launch Elasticsearch inside the virtual machine (to enable certain search features)
I’ve been trying to do so programatically in Python but is kind of hard.
So I was wondering if I could just spin up an Elasticsearch instance using Docker

Hi @ugaray96 I see, in that case a Dockerfile would be much easier. I’ll DM you here.

Looking forward to the Dockerfile support!

1 Like

Hi @radames this space of yours radames/stable-diffusion-depth2img at main has a custom Dockerfile. Does this mean it is supported now? Let me know if I missed something. Thank you!

Hello @hugbump and @ugaray96 Spaces Docker now it’s official!

2 Likes

Hi @radames those are awesome news!!!
I’m trying now to get it working with Elasticsearch. Do you know if we can use docker-compose.yml?
Thanks!

Hi @ugaray96 , we don’t have plans to support docker compose at the moment. But depending on your application, you can manually create multi Spaces.

I’m trying to deploy an application that uses Elasticsearch internally for search, as a backend.
I don’t know what multi Spaces are. Would it be deploying Elasticsearch in one Space and using it from another?

exactly! Please let me know if that works

This is cool! Thank you @radames!

And how do I reference the other Space’s Elasticsearch url? Is it public by default or do the Spaces communicate in a smart way?