-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathnut.yml
71 lines (69 loc) · 2.48 KB
/
nut.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
syntax_version: "6"
project_name: caffe
docker_image: matthieudelaro/work-on-caffe
container_working_directory: /opt/caffe
mount:
main:
- ./caffe
- /opt/caffe
dataset: # if you store your datasets in another folder, add them this way
- /path/to/dataset
- /dataset
macros:
download:
usage: download caffe
container_working_directory: /opt/
actions:
- git clone https://github.com/BVLC/caffe.git caffe
- cd caffe
- cp Makefile.config.example Makefile.config
build:
usage: build the project
actions:
- make all -j8
- echo "/opt/caffe/.build_release/lib/" >> /etc/ld.so.conf.d/caffe-ld-so.conf
- ldconfig
build-cpu:
usage: build the project in CPU mode only (set CPU_ONLY from Makefile.config on the fly)
actions:
- sed -i 's/# CPU_ONLY := 1/CPU_ONLY := 1/' Makefile.config
- make all -j8
- echo "/opt/caffe/.build_release/lib/" >> /etc/ld.so.conf.d/caffe-ld-so.conf
- ldconfig
build-gpu:
usage: build the project in GPU mode (unset CPU_ONLY from Makefile.config on the fly)
actions:
- sed -i 's/CPU_ONLY := 1/# CPU_ONLY := 1/' Makefile.config
- make all -j8
- echo "/opt/caffe/.build_release/lib/" >> /etc/ld.so.conf.d/caffe-ld-so.conf
- ldconfig
build-pycaffe:
usage: build pycaffe
actions:
- make pycaffe -j8
test-cpu:
usage: run the tests in CPU mode only (set CPU_ONLY from Makefile.config on the fly)
actions:
- sed -i 's/# CPU_ONLY := 1/CPU_ONLY := 1/' Makefile.config
- make runtest -j8
test-gpu:
usage: run the tests in GPU mode (unset CPU_ONLY from Makefile.config on the fly)
enable_nvidia_devices: true
actions:
- sed -i 's/CPU_ONLY := 1/# CPU_ONLY := 1/' Makefile.config
- make runtest -j8
train-mnist-cpu:
usage: attemps to train MNIST in CPU mode only (solver_mode in examples/mnist/lenet_solver.prototxt on the fly)
actions:
- "sed -i 's/solver_mode: GPU/solver_mode: CPU/' examples/mnist/lenet_solver.prototxt"
- ./data/mnist/get_mnist.sh
- ./examples/mnist/create_mnist.sh
- caffe train --solver=examples/mnist/lenet_solver.prototxt
train-mnist-gpu:
usage: attemps to train MNIST in GPU mode (solver_mode in examples/mnist/lenet_solver.prototxt on the fly)
enable_nvidia_devices: true
actions:
- "sed -i 's/solver_mode: CPU/solver_mode: GPU/' examples/mnist/lenet_solver.prototxt"
- ./data/mnist/get_mnist.sh
- ./examples/mnist/create_mnist.sh
- caffe train --solver=examples/mnist/lenet_solver.prototxt