Skip to content

Procedure support #74

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

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from
Draft

Procedure support #74

wants to merge 15 commits into from

Conversation

meatballhat
Copy link
Contributor

@meatballhat meatballhat commented Apr 16, 2025

I'm able to run procedures by switching to python 3.13 and then running the server like this:

ORIG_PYTHONPATH="${PYTHONPATH}"
PYTHONPATH="."
# `pipelines-runtime` python code
PYTHONPATH+=":${PWD}/../pipelines-runtime"
# `cog-runtime` python code
PYTHONPATH+=":${PWD}/python"
# `cog-runtime` virtualenv
PYTHONPATH+=":${PWD}/.venv/lib/python3.13/site-packages"
# `pipelines-runtime` virtualenv
PYTHONPATH+=":${PWD}/../pipelines-runtime/.venv/lib/python3.13/site-packages"

PYTHONPATH+=":${ORIG_PYTHONPATH}"
export PYTHONPATH

printf 'PYTHONPATH:\n'
printenv PYTHONPATH | tr ':' '\n'

# not critical but yeah
export LOG_FORMAT=development
export LOG_LEVEL=debug

./cog-server server --use-procedure-mode --await-explicit-shutdown

and then making procedure requests like this (typical for procedures):

curl -s \
  -H 'Content-Type: application/json' \
  -X POST \
  -d '{"input":{"procedure_source_url":"file:///Users/me/code/replicate/pipelines-runtime/fixtures/hello-pipelines","token":"<REDACTED-REPLICATE-API-TOKEN>","inputs_json":"{\"word\":\"young sheldon\"}"}}' \
  http://127.0.0.1:5000/predictions

@nevillelyh
Copy link
Contributor

This changes a lot of things. What exactly is needed for procedures to work on top of #73?

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

Successfully merging this pull request may close these issues.

2 participants