summaryrefslogtreecommitdiff
path: root/notes/frameworks
diff options
context:
space:
mode:
authoradamhrv <adam@ahprojects.com>2019-02-10 16:22:09 +0100
committeradamhrv <adam@ahprojects.com>2019-02-10 16:22:09 +0100
commit53d5509a3271294c4332d70d5d371735ebbb2be8 (patch)
tree201d50d360f59a36852de8ec656ffae45a6b9c70 /notes/frameworks
parent74eb3c7a3e5481d8a2811136521419f91ae77486 (diff)
update notes
Diffstat (limited to 'notes/frameworks')
-rw-r--r--notes/frameworks/cairo.md21
-rw-r--r--notes/frameworks/dlib.md17
-rw-r--r--notes/frameworks/jupyter.md6
3 files changed, 36 insertions, 8 deletions
diff --git a/notes/frameworks/cairo.md b/notes/frameworks/cairo.md
index 3eeb2159..4022ae54 100644
--- a/notes/frameworks/cairo.md
+++ b/notes/frameworks/cairo.md
@@ -1,8 +1,6 @@
# Cairo
-WeasyPrint relies on Cairo>1.14.~ but cairo=1.15.* didn't install correctly. Cairo 1.16.0 tested and works as of Feb 9
-
-Install cairo on Ubuntu 16.04 for WeasyPrint
+Requires cairo built form source. The conda builds dont' work: unable to render background-image css. On Ubuntu18+ might be able to install with apt. For Ubuntu 16.04 run:
```
wget https://www.cairographics.org/releases/cairo-1.16.0.tar.xz
@@ -11,7 +9,18 @@ cd cairo-1.16.0
./configure --prefix=$HOME/code/cairo
make
make install
-export PKG_CONFIG_PATH=$HOME/code/cairo/lib/pkgconfig
-export LD_LIBRARY_PATH=$HOME/code/cairo/lib
+export PKG_CONFIG_PATH=$HOME/code/cairo/lib/pkgconfig:$PKG_CONFIG
+export LD_LIBRARY_PATH=$HOME/code/cairo/lib:$LD_LIBRARY_PATH
# pip install weasyprint
-``` \ No newline at end of file
+```
+
+Virtualenv
+- Works in virtualenv with python `mkvirtualenv weasycairo -p python3.6`
+- Doesn't work in virtualenv w/o cairo local build paths, cairo is < 1.15.4
+
+Conda
+- Works in conda env with python 3.6 and cairo built on system with paths set
+- doesn't work with conda build of 1.16 (both builds don't work)
+- Doesnt work in megapixels conda env even with local cairo build
+
+WeasyPrint relies on Cairo>1.15.4. Locally built Cairo 1.16.0 tested and works as of Feb 9. But the conda installed Cairo 16 has issues \ No newline at end of file
diff --git a/notes/frameworks/dlib.md b/notes/frameworks/dlib.md
index a497f761..decf182b 100644
--- a/notes/frameworks/dlib.md
+++ b/notes/frameworks/dlib.md
@@ -1,7 +1,20 @@
# dlib
+
+```
+git clone https://github.com/davisking/dlib.git
+cd dlib
+mkdir build
+d build
+cmake .. -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1
+cmake --build .
+cd ..
+python setup.py install --yes USE_AVX_INSTRUCTIONS --yes DLIB_USE_CUDA
+python -c 'import dlib;print(f'dlib GPU installed: {dlib.DLIB_USE_CUDA})'
+```
+
- dlib==19.7 required for `face_recognition`
- dlib==19.6 works for 3ddfa
-
- `libmkl_rt.so` is missing: `export LD_LIBRARY_PATH=/home/adam/anaconda3/lib/:$LD_LIBRARY_PATH`
-- if `lib16..so` is missing: `apt install libboost-all-dev` \ No newline at end of file
+- if `lib16..so` is missing: `apt install libboost-all-dev`
+- libmkl_rt.so canont open shared object file: <https://github.com/davisking/dlib/issues/587> \ No newline at end of file
diff --git a/notes/frameworks/jupyter.md b/notes/frameworks/jupyter.md
new file mode 100644
index 00000000..787fa4b9
--- /dev/null
+++ b/notes/frameworks/jupyter.md
@@ -0,0 +1,6 @@
+# Jupyter
+
+- `conda install nb_conda nb_conda_kernels jupyter`
+- add `python -m ipykernel install --user --name megapixels`
+- remove `jupyter kernelspec remove weasycairo_ve_36`
+- list `jupyter kernelspec list` \ No newline at end of file