GithubHelp home page GithubHelp logo

mikpim01 / django_blender Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tesla-coil/django_blender

0.0 1.0 0.0 118 KB

Blender as Python module in Django with Channels and Celery to task queuing

Python 83.03% HTML 16.97%

django_blender's Introduction

Blender as module with Django Channels and Celery

This example shows how using Blender as Python module in Django project with Celery to task queuing. Demo video: https://www.youtube.com/watch?v=42nvLjOv8Ng

Building dependencies and setup environment

Custom Python build with enable-shared

wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
tar -xvf Python-3.5.2.tgz
cd Python-3.5.2
./configure --prefix=/opt/py35 --enable-shared
sudo make install

Create virtual environment for project

/opt/py35/bin/python3 -m venv ~/django-blender-env

Build Blender as module

Get source

mkdir ~/blender-git
cd ~/blender-git
git clone https://git.blender.org/blender.git
cd blender
git submodule update --init --recursive
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master

Build Blender dependencies

cd ~/blender-git
./blender/build_files/build_environment/install_deps.sh

Compile Blender

mkdir ~/blender-git/build
cd ~/blender-git/build
cmake ../blender -DWITH_PYTHON_INSTALL=OFF -DWITH_PLAYER=OFF -DWITH_PYTHON_MODULE=ON -DCMAKE_INSTALL_PREFIX=$HOME/django-blender-env/lib/python3.5/site-packages
make
make install

Setup Project

Make sure that you have installed Redis

sudo add-apt-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt-get install redis-server

Clone and install dependencies in virtual environment

cd ~/django-blender-env
source bin/activate
git clone https://github.com/hophead-ninja/django_blender.git
cd django_blender
pip install -r requirements.txt

Django migrations

python manage.py makemigrations
python manage.py migrate

Run

Run server

python manage.py runserver

Run worker

celery worker -A django_blender -l info

django_blender's People

Contributors

hoppy-tools avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.