Commit 12d33735 authored by Richard Torenvliet's avatar Richard Torenvliet

Made changes for production deployment

parent 91eabca7
......@@ -7,3 +7,4 @@ src/reconstruction/*.c
src/reconstruction/build/
*.dSYM
vendor/*
*.pyc
TARGETS += data/pca_shape_train_model.npy
.PHONY := train_model show_pca test_model show_reconstruction
DEBUG_LEVEL=*
data/imm_face_db: data/imm_face_db.tar.gz
(cd data; mkdir -p imm_face_db; \
tar -xvzf imm_face_db.tar.gz -C imm_face_db
tar -xvzf imm_face_db.tar.gz -C imm_face_db \
)
train_model: train_shape train_texture
train_texture: data/pca_imm_texture_model.npy data/pca_ibug_texture_model.npy
train_shape: data/pca_imm_shape_model.npy data/pca_ibug_shape_model.npy
shape_predictor_68_face_landmarks.dat:
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 -P data/
(cd data/; bzip2 -d shape_predictor_68_face_landmarks.dat.bz2)
data/imm_face_db.tar.gz:
(cd data; wget http://www.imm.dtu.dk/~aam/datasets/imm_face_db.tar.gz)
......@@ -17,7 +16,8 @@ data/imm_face_db.tar.gz:
runnit:
$(BASE_DOCKER_CMD) python main.py
compile_texture: src/reconstruction/texture.pyx
src/reconstruction/texture.so: src/reconstruction/texture.pyx
$(BASE_DOCKER_CMD) /bin/bash -c '(cd reconstruction; python setup.py build_ext --inplace)'
data/pca_imm_shape_model.npy:
......
DEBUG:=1
VERSION:=v0.1
IMAGE_TAG:= icyrizard/face-reconstruction.git:$(VERSION)
BASE_DOCKER_CMD:= docker run \
--rm \
--volume /Users/richard/Documents/sighthub/face-reconstruction/data:/data \
--volume /Users/richard/Documents/sighthub/face-reconstruction/src:/src \
HERE:=$(shell pwd)
DOCKER_RUN_FLAGS:= --rm \
--volume $(HERE)/data:/data \
--volume $(HERE)/src:/src \
-e "DEBUG=$(DEBUG)" \
-p 8888:8888 \
$(IMAGE_TAG)
-p 6930:8888
include actions.mk
include src/reconstruction/build.mk
BASE_DOCKER_CMD:= docker run $(DOCKER_RUN_FLAGS) $(IMAGE_TAG)
$(info $(TARGETS))
all: $(TARGETS)
DEPENDENCIES:= data/imm_face_db
TARGETS:= shape_predictor_68_face_landmarks.dat\
src/reconstruction/texture.so \
data/pca_ibug_shape_model.npy \
data/pca_ibug_texture_model.npy
data: data/imm_face_db
reconstruction: texture.so
all: $(DEPENDENCIES) $(TARGETS)
include actions.mk
include src/reconstruction/build.mk
OS := $(shell uname)
......@@ -23,7 +29,7 @@ build: requirements.txt
docker build -t $(IMAGE_TAG) .
run-bash:
$(BASE_DOCKER_CMD) --interactive --tty $(IMAGE_TAG) /bin/bash
docker run --interactive --tty $(DOCKER_RUN_FLAGS) $(IMAGE_TAG) /bin/bash
$(VIRTUALENV):
virtualenv -p $(PYTHON_BIN_PATH) venv
......
HERE := $(shell pwd)
TARGETS += src/reconstruction/texture.so
ifeq ($(OS),Darwin)
HALIDE_LINK:=https://github.com/halide/Halide/releases/download/release_2016_04_27/halide-mac-64-trunk-2f11b9fce62f596e832907b82d87e8f75c53dd07.tgz
......
......@@ -194,7 +194,7 @@ app = web.Application([
if __name__ == '__main__':
app.listen(8888)
app.listen(8888, xheaders=True)
ioloop = ioloop.IOLoop.instance()
autoreload.start(ioloop)
ioloop.start()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment