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

Question about hosting the docker image #1539

Open
4 of 11 tasks
SebastianStehle opened this issue Sep 11, 2023 · 4 comments
Open
4 of 11 tasks

Question about hosting the docker image #1539

SebastianStehle opened this issue Sep 11, 2023 · 4 comments

Comments

@SebastianStehle
Copy link

SebastianStehle commented Sep 11, 2023

(A Markdown syntax reminder is available here: https://guides.github.com/features/mastering-markdown/)

Before creating a new issue, please make sure that:

If Ok, please give as many details as possible to help us solve the problem more efficiently.

Configuration

  • Version of DeepDetect:
    • Locally compiled on:
      • Ubuntu 18.04 LTS
      • Other:
    • Docker CPU
    • Docker GPU
    • Amazon AMI
  • Commit (shown by the server when starting):

Your question / the problem you're facing:

Hi,

I have 2 questions. I hope it is okay, when I bundle them here:

  1. I am calling the server from a local service, that uses a self signed https certificate. Is it possible to turn off https validation to download the image from this service?

  2. I am trying to figure out how to host this. My problem is that I would like to use it in a setup with multiple hosting options. My own kubernetes setup, but also cloud and so on. If I understand it properly the services are not persisted, right? They only exist in memory and are just a mapping to a model. So my only option would be to have a sidecar in kubernetes or find a solution how to make a network call in the container itself after service is already started? Calling the container from the outside does not seem to work, when you have multiple instances with unknown hostnames. Is there a good solution for that to setup a container?

Error message (if any) / steps to reproduce the problem:

  • list of API calls:

  • Server log output:

@beniz
Copy link
Collaborator

beniz commented Sep 11, 2023

Hi @SebastianStehle some answers below:

1. I am calling the server from a local service, that uses a self signed https certificate. Is it possible to turn off https validation to download the image from this service?

Rephrasing to make sure I understand correctly: fetching (png,jpg,...) images from self-signed certificate yields an error.

Two ways of fixing this I see:

2. I am trying to figure out how to host this. My problem is that I would like to use it in a setup with multiple hosting options. My own kubernetes setup, but also cloud and so on. If I understand it properly the services are not persisted, right? They only exist in memory and are just a mapping to a model. So my only option would be to have a sidecar in kubernetes or find a solution how to make a network call in the container itself after service is already started? Calling the container from the outside does not seem to work, when you have multiple instances with unknown hostnames. Is there a good solution for that to setup a container?

You are correct the services are not persisted. However, the dede exe has a --service_start_list option that takes a file with the list of service creation JSON calls to execute upon startup.

Now, this may not be exactly straightforward to use with our provided Docker images since they do start the server without a service start file here: https://github.com/jolibrain/deepdetect/blob/master/docker/cpu.Dockerfile#L188

A solution here would be to build your own docker images, another would be to find a way to override the call upon startup, my personal knowledge of Docker does not extend far enough to tell you with certainty whether and how this is possible.

Don't hesitate if this does not fully answer your difficulties.

@SebastianStehle
Copy link
Author

SebastianStehle commented Sep 11, 2023

Thanks a lot for the fast answer.

  1. Such an option (e.g. as environment variable) would be awesome. My users make a lot of weird things, so it is not only about local development.

  2. I figured this out myself:
    I have just created a script that I run in the background: https://github.com/Squidex/squidex-hosting/tree/master/development/deepdetect. This script then waits for the server and creates the service:
    https://github.com/Squidex/squidex-hosting/blob/master/development/deepdetect/setup.sh

@beniz
Copy link
Collaborator

beniz commented Sep 11, 2023

  1. Such an option (e.g. as environment variable) would be awesome. My users make a lot of weird things, so it is not only about local development.

In our way of structuring options, it might be an API parameter instead.

@SebastianStehle
Copy link
Author

Fine for me as well...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants