Skip to content

Commit 78ce365

Browse files
committed
docker files improved - base docker image created
1 parent b23ebe9 commit 78ce365

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ RUN cd ${BUILD_DIR} \
3131
&& mkdir -p build \
3232
&& cd build \
3333
&& cmake .. -DCMAKE_BUILD_TYPE=Release \
34-
&& cmake --build . \
35-
&& cmake --build . --target install
34+
&& cmake --build . -- -j $(nproc) \
35+
&& cmake --build . --target install -- -j $(nproc)
3636

3737
# Install Python requirements
3838
RUN cd ${BUILD_DIR} \

Dockerfile.jupyter

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM geographica/osrmcpy:latest
2+
3+
# Environment
4+
ENV BUILD_DIR /usr/src
5+
6+
WORKDIR /usr/local/app
7+
8+
RUN pip install jupyterlab>=0.35

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ This repository is Geographica version of libosrmc, focused only on Python 3 bin
66

77
### Building
88

9-
First you must build Docker container:
9+
First you must build base Docker image:
10+
11+
```
12+
$ cd docker
13+
$ docker build --pull -t geographica/osrmcpy:latest .
14+
```
15+
16+
### Running with Jupyter
17+
18+
You must build your Docker container with Docker-Compose:
1019

1120
```
1221
$ docker-compose build

docker-compose.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
version: '3'
22
services:
33
osrmcpy-jupyter:
4-
build: .
4+
build:
5+
context: .
6+
dockerfile: Dockerfile.jupyter
57
volumes:
68
- ./:/usr/local/app
79
ports:
8-
- '8888:8888'
10+
- '8889:8888'
911
command: jupyter lab --NotebookApp.token= --ip=0.0.0.0 --no-browser --allow-root

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
numpy>=1.15
22
pandas>=0.23
3-
jupyterlab>=0.35

0 commit comments

Comments
 (0)