-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (76 loc) · 2.05 KB
/
docker-compose.yml
File metadata and controls
85 lines (76 loc) · 2.05 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# FLYNNCONCEIVABLE! - Docker Compose
#
# Usage:
# docker-compose up # Run the demo
# docker-compose run shell # Interactive shell
# docker-compose run test # Run tests
# docker-compose run python # Python REPL with flynnconceivable
#
# Build locally:
# docker-compose build
#
version: '3.8'
services:
# Main demo service
flynnconceivable:
build: .
image: flynncomm/flynnconceivable:latest
container_name: flynnconceivable
stdin_open: true
tty: true
# Runs the demo by default (from Dockerfile CMD)
# Interactive shell
shell:
build: .
image: flynncomm/flynnconceivable:latest
container_name: flynnconceivable-shell
stdin_open: true
tty: true
command: /bin/bash
working_dir: /app
# Run tests
test:
build: .
image: flynncomm/flynnconceivable:latest
container_name: flynnconceivable-test
command: python -m pytest tests/ -v --tb=short
# Python REPL
python:
build: .
image: flynncomm/flynnconceivable:latest
container_name: flynnconceivable-python
stdin_open: true
tty: true
command: python
working_dir: /app
# Benchmark
benchmark:
build: .
image: flynncomm/flynnconceivable:latest
container_name: flynnconceivable-benchmark
command: python -c "exec(open('/app/benchmark_runner.py').read())"
working_dir: /app
# Quick start tutorial
quickstart:
build: .
image: flynncomm/flynnconceivable:latest
container_name: flynnconceivable-quickstart
stdin_open: true
tty: true
command: python -c "
import sys
sys.path.insert(0, '/app')
from flynnconceivable import CPU
print()
print('Welcome to FLYNNCONCEIVABLE!')
print()
print('Try this:')
print(' cpu = CPU(weights_dir=\"flynnconceivable/weights\")')
print(' cpu.load([0xA9, 0x25, 0x18, 0x69, 0x1A, 0x00])')
print(' cpu.run()')
print(' print(cpu.A) # Should be 63')
print()
# Drop into interactive Python
import code
code.interact(local=dict(CPU=CPU))
"