Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
557bf5fe
Commit
557bf5fe
authored
Aug 14, 2017
by
Chris Lishka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial basic dockerfile for building and running unit tests in CPU-only environment.
parent
7da5f65e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
0 deletions
+90
-0
Dockerfile.ngraph_cpp_cpu
contrib/docker/Dockerfile.ngraph_cpp_cpu
+27
-0
Makefile
contrib/docker/Makefile
+52
-0
README.md
contrib/docker/README.md
+11
-0
No files found.
contrib/docker/Dockerfile.ngraph_cpp_cpu
0 → 100644
View file @
557bf5fe
# Environment to build and unit-test private-ngraph-cpp
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y build-essential && \
apt-get clean autoclean && \
apt-get autoremove -y
RUN apt-get install -y cmake && \
apt-get clean autoclean && \
apt-get autoremove -y
RUN apt-get install -y clang-3.9 && \
apt-get clean autoclean && \
apt-get autoremove -y
RUN apt-get install -y clang-format-3.9 && \
apt-get clean autoclean && \
apt-get autoremove -y
RUN apt-get install -y git && \
apt-get clean autoclean && \
apt-get autoremove -y
WORKDIR /root/ngraph-cpp-test
contrib/docker/Makefile
0 → 100644
View file @
557bf5fe
# Basic Makefile for contrib/docker. This can be expanded later as more targets
# are added.
DIR
=
$
(
realpath
../..
)
VOLUME
=
-v
${
DIR
}
:/root/ngraph-cpp-test
GIT_COMMIT
=
$(
shell
git rev-parse HEAD
)
BUILD_VERSION
=
${
GIT_COMMIT
}
_
${
PYTHON_VERSION
}
BUILD_DIR
=
${
DIR
}
/contrib/docker/.build-
${
BUILD_VERSION
}
NGRAPH_NGRAPH_CPP_CPU_IMG
:=
$(
shell
docker images ngraph_cpp_cpu
CALLER_UID :
=
$(
shell
id
-u
)
CALLER_GID :
=
$(
shell
id
-g
)
# MKLDNN_ROOT=/usr/local
# MY_PYTHONPATH=./:/root/ngraph-cpp-test/
.PHONY: clean build_ngraph_cpp_cpu shell build_all
DOCKER_BUILD
=
docker build
--rm
=
true
ifdef http_proxy
DOCKER_BUILD+
=
--build-arg
http_proxy
=
$(http_proxy)
endif
ifdef http_proxy
DOCKER_BUILD+
=
--build-arg
https_proxy
=
$(https_proxy)
endif
expand_dockerfile_templates:
cd
${
DIR
}
/contrib/docker
mkdir
${
BUILD_DIR
}
||
true
sed
-e
's/\(FROM ngraph.*\)/\1:${BUILD_VERSION}/'
Dockerfile.ngraph_cpp_cpu
>
${
BUILD_DIR
}
/Dockerfile.ngraph_cpp_cpu
clean:
rm
-f
${
DIR
}
/contrib/docker/.build-
*
/Dockerfile.
*
||
echo
"keep going if files are not present"
rmdir
${
DIR
}
/contrib/docker/.build-
*
||
echo
"keep going if directory is not present"
rm
-f
${
DIR
}
/
*
.xml
rm
-f
${
DIR
}
/
*
.dat
build_ngraph_cpp_cpu: expand_dockerfile_templates
$(DOCKER_BUILD)
-f
=
${
BUILD_DIR
}
/Dockerfile.ngraph_cpp_cpu
--build-arg
python_version
=
${
PYTHON_VERSION
}
-t
=
ngraph_cpp_cpu:
${
BUILD_VERSION
}
${
DIR
}
# remove the tag for the previous latest image
docker rmi ngraph_cpp_cpu:latest
||
echo
"keep going if docker rmi command fails"
docker tag
`
docker images
-q
ngraph_cpp_cpu:
${
BUILD_VERSION
}
`
ngraph_cpp_cpu:latest
build_all: build_ngraph_cpp_cpu
shell: build_ngraph_cpp_cpu
docker run
--rm
${
VOLUME
}
-it
ngraph_cpp_cpu:
${
BUILD_VERSION
}
/bin/bash
all: build_ngraph_cpp_cpu
contrib/docker/README.md
0 → 100644
View file @
557bf5fe
## Usage
From this directory you can:
### make build_ngraph_cpp_cpu
will build Docker image for building NGraph-Cpp and running unit tests
### make shell
will put you into a bash shell with NGraph-Cpp installed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment