These are chat archives for beniz/deepdetect

1st
Dec 2018
Bill Gleim
@gleim
Dec 01 2018 01:23
hi @beniz, if I run the docker image from docker hub (via service on docker swarm) I am successful. If I attempt to run a docker image assembled from the repository via service on the same swarm it fails. any thoughts, ideas or suggestions?
context: I am attempting to resolve CORS issues on the server side via additional parameters provided to dede.
Emmanuel Benazera
@beniz
Dec 01 2018 15:24
The dede exe has a flag --allow_originwith which you can pass the IP / domain you'd like to allow.
Bill Gleim
@gleim
Dec 01 2018 16:59
Hi Emmanuel, thank you yes, exactly. I am attempting to add the flag to the Dockerfile. However, since the docker image assembled from the repository is failing (at docker service create from swarm manager), I am unable to add that flag (versus running the standard docker image, which runs successfully but does not include this flag in its call to dede).
or, more correctly stated, I can add that flag to the Dockerfile and create an updated CORS-friendly deepdetect image but because the docker container fails to start as a service it is irrelevant that I made the addition.
Bill Gleim
@gleim
Dec 01 2018 17:05
is beniz/deepdetect_cpu image on docker hub assembled from docker/cpu/Dockerfile?
Emmanuel Benazera
@beniz
Dec 01 2018 17:54
It is. In general it is best to take care of cors outside of DD but the flag can help in some cases.
Bill Gleim
@gleim
Dec 01 2018 18:07
if anyone here finds the opportunity to replicate or refute my experience of assembling a Docker image for cpu that consistently fails to start as a service on a docker swarm, I would greatly value that information. thank you
Emmanuel Benazera
@beniz
Dec 01 2018 18:11
We use docker extensively but Im not familiar with swarm
Bill Gleim
@gleim
Dec 01 2018 18:12
once you try it you might be hooked, and it is super simple.
tl;dr: docker swarm init --advertise-addr <IP address of primary node> to start. docker node ls to verify. from second compute node, execute the command provided after the init call. docker node ls on primary node to verify second node joined cluster. docker service create --name deepdetect --publish 80:8080 beniz/deepdetect_cpu:latestto start a container. docker service ls to verify. docker service scale deepdetect=2 to scale across all nodes in cluster. docker service ls to verify container scaling.
Emmanuel Benazera
@beniz
Dec 01 2018 18:20
We mostly rely on docker compose
Bill Gleim
@gleim
Dec 01 2018 18:46
In general it is best to take care of cors outside of DD
^-- do you have an example of how you've handled this?
Emmanuel Benazera
@beniz
Dec 01 2018 18:51
Nginx I believe
Bill Gleim
@gleim
Dec 01 2018 18:54
great, thx, I'll see if I can identify a workaround or a solution.