This approach will setup all of depenendices in your local python environment.
- docker (optional)
- git
- python
git clone https://github.com/mc-bench/mc-bench-backendPython 3.12.7 installed. We recommend pyenv.
pyenv install 3.12.7A virtual environment created and activated somewhere
via pyenv (recommended)
pyenv virtualenv 3.12.7 mc-bench-backend
pyenv activate mc-bench-backendvia vanilla venv
pyenv shell 3.12.7
python -m venv .venv
source .venv/bin/activateCopy the .env file
cp .env.template .envPopulate the .env with your values.
Load envs into shell
source .envSee frontend setup docs for setting up a a Github Oauth 2.0 app.
Update the values in your local env file as:
export GITHUB_CLIENT_ID="<your_client_id>"
export GITHUB_CLIENT_SECRET="<your_client_secret>"
Auth call back URL should be on http://localhost:5173/login
Load envs into shell
source .envInstall the project, as an editable package
pip install -e ".[dev]"Once you have completed setting up the python enviornment, it is time to setup the databases.
This application requires 3 databases: postgres, redis,
There are 2 approaches, running the database as a local service or from the docker-compose.
This will run the doc
docker-compose run -d -p 5432:5432 postgres
docker-compose run -d -p 6379:6379 redisMacOS homebrew setup
brew install postgresql@16
brew install redis
brew services start postgresql@16
brew services start redis
You will need to create a database
./bin/manual-postgres-setup
Load the environment variables with
source .envWith the python virtual environment activated, run the database migrations
mc-bench-alembic upgrade head<< frontend running >>
python celery -A mc_bench.apps.admin_worker flower python python -m mc_bench.apps.scheduler python server /data --console-address 0.0.0.0:9001 uvicorn mc_bench.apps.admin_api.main:app --proxy-headers --port 8000 --host 0.0.0.0
You will want Grant Roles Doc
Unfortunately bpy, the python library for Blender, is not compatible with python 3.12. If you want to work on the rendering code, you need to use python 3.11.7. Once you have installed the python 3.11.7 environment, you can install the dependencies with:
pip install -e .[render-worker]