https://prefect.io logo
Title
m

m

10/28/2021, 3:53 PM
was someone able to run prefect server in local with docker container or something ?
k

Kevin Kho

10/28/2021, 3:56 PM
Hey @m, you’re trying to run all services on one container? I think you might be able to start it from the docker container, but server will still spin up multiple containers through docker compose. Just making sure you also know (a lot of users are unaware) that Cloud has 10000 free task runs every month, which is more than enough to get started with.
m

m

10/28/2021, 4:07 PM
as u can see i run the official container of prefectserver hq and it doesn't run the serveur but exit
maybe there an other way too run server local ?
there are no more documentation about docker on the web doc
k

Kevin Kho

10/28/2021, 4:15 PM
Kubernetes with helm would be the other way. Am confused if you’re running this inside a container? It shouldn’t be run in a container.
m

m

10/28/2021, 4:16 PM
no I setted my docker compose like that
version: "3" # optional since v1.27.0 services: prefect-server : image: prefecthq/prefect:master ports: - "8080:8080"
i get the official imga from there
I use sudo docker-compose up to build my docker compose
k

Kevin Kho

10/28/2021, 4:19 PM
ohh. does using
prefect server start
run into the same issue?
m

m

10/28/2021, 4:25 PM
i have many other issue with prefect server start
k

Kevin Kho

10/28/2021, 4:27 PM
Ok will ask the team about this
m

m

10/28/2021, 4:29 PM
thank you very much , in fact I try to set it in local way because I would show how usefull is prefect for an MLOps test, and need to delivring an reproductible local environement
k

Kevin Kho

10/28/2021, 4:32 PM
Understand that
Could you maybe try the original docker compose file first and just see if it works before we edit later? Like a fresh install of prefect and then
prefect server start
. Or using the original compose file in the server repo?
:upvote: 1
z

Zanie

10/28/2021, 4:54 PM
Could you share your docker compose version as well?
m

m

10/28/2021, 5:50 PM
hello michael
docker-compose version 1.25.0, build unknown
@Kevin Kho where could I found the orginal docker compose ?
I upgraded it I will try again
k

Kevin Kho

10/28/2021, 6:31 PM
Oh I thought you were edited it previously? If you didn’t ignore my comment
m

m

10/28/2021, 6:39 PM
no I build my own with the dockerimage of the serveur
k

Kevin Kho

10/28/2021, 6:40 PM
oh i guess ignore my comment and just try with installing prefect and
prefect server start
? this will spin up the containers for you
m

m

10/28/2021, 6:49 PM
I did it again, first I have to mofidy the cli/server.py with sudo in subprocess dockercompose
for make it work
i get exactly the same error
k

Kevin Kho

10/28/2021, 6:51 PM
Just so I can replicate what you are doing, did you
pip install prefect
and are you on
0.15.7
?
Btw how to you make these gifs? They are gorgeous. I really appreciate it but if it’s too much work you can really just paste the logs
m

m

10/28/2021, 6:51 PM
this time I did it with
conda install -c conda-forge prefect
my version is
0.15.7
my version of docker is
Docker version 20.10.7, build 20.10.7-0ubuntu1~20.04.2
z

Zanie

10/28/2021, 6:56 PM
This could easily be an issue with environment variables not being passed through when you run
sudo
m

m

10/28/2021, 7:00 PM
maybe it would be easier to don't have to sudo on docker-compose
could you tell me which env variable need to be passed in default setting ?
I need to pass it in sudo command
z

Zanie

10/28/2021, 7:10 PM
We are passing a bunch of environment variables through to configure the docker-compose command
You can see some of the notable ones in the startup logs when there are warnings that variables are being set to blank strings.
I'd recommend configuring
docker-compose
such that you don't need
sudo
m

m

10/28/2021, 8:06 PM
okey I manage my problem with sudo it came from docker and not docker compose
I added a user group and it woring
thank you very much
❤️💯
👍 1