Good Morning, Prefect Community! I am setting up P...
# introductions
j
Good Morning, Prefect Community! I am setting up Prefect 2 on an Ubuntu server, and I can run flows without issue. However, I want this setup under a "prefect" user and running automagically. Am I overlooking something like this in the documentation? Any direction would be greatly appreciated.
👋 15
4
n
Hi @Jason Noxon! Generally, #CL09KU1K7 is a good channel to ask this sort of question in. By this
However, I want this setup under a "prefect" user and running automagically
I assume you mean you want to run an agent on this ubuntu machine, in which case you could check this out if you mean something else, feel free to clarify!
🙏 1
j
Just from the title, that is EXACTLY what I needed. Thank you!
🦜 6
n
sure thing!
j
Hi, Nate! One more question: any documentation for using a venv for that prefect user? So when prefect starts as the daemon that it uses a virtual environment?
n
Hi Jason, not to nag but please ask future questions in #CL09KU1K7 as we'll have more eyes on the question / will be better able to assist you 🙂 you can precede your
prefect agent start ...
command with whatever python interpreter you choose
Copy code
...
ExecStart=/path/to/my/venv/python prefect agent start -q myQueue
...
this may be useful context it's my opinion that running virtual environments (to enable flow runs using the Process infrastructure) on VMs like this becomes difficult to manage at scale, so I would suggest that you may want to install docker on your VM and then you don't need to worry about the python environment your agent is running in on a project-by-project basis, because your dependencies for each project are built into some DockerContainer (more on building images)
j
Oh my god, I am so sorry - I thought I was in the #CL09KU1K7 channel! Apologies.
n
no problem at all 😄 it's just easier for us to help in that channel hopefully the above was still helpful
🙌 1
panda dancing 1
t
Hi Jason 🙂 welcome to Prefect slack panda dancing
j
Thanks, @Taylor Curran! Things you should know about me: I like movies, good food, and I don't post in the correct channel!
cool llama 3
🤣 1