Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
Merge OpenCL images [experimental]
Browse files Browse the repository at this point in the history
Closes: #17
  • Loading branch information
3XX0 committed May 27, 2016
1 parent 1dff2bb commit 9fdb5f6
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
20 changes: 20 additions & 0 deletions mk/opencl.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.

NV_DOCKER ?= docker

# Building Docker images in parallel will duplicate identical layers.
.NOTPARALLEL:
.PHONY: all latest devel runtime

all: latest devel runtime

#################### OpenCL ####################

latest: devel
$(NV_DOCKER) tag opencl:$< opencl

devel: $(CURDIR)/devel/Dockerfile
$(NV_DOCKER) build -t opencl:$@ $(CURDIR)/devel

runtime: $(CURDIR)/runtime/Dockerfile
$(NV_DOCKER) build -t opencl:$@ $(CURDIR)/runtime
3 changes: 3 additions & 0 deletions ubuntu-14.04/opencl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.

include ../../mk/opencl.mk
7 changes: 7 additions & 0 deletions ubuntu-14.04/opencl/devel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM opencl:runtime
MAINTAINER NVIDIA CORPORATION <[email protected]>

RUN apt-get update && apt-get install -y --no-install-recommends --force-yes \
clinfo \
ocl-icd-opencl-dev && \
rm -rf /var/lib/apt/lists/*
18 changes: 18 additions & 0 deletions ubuntu-14.04/opencl/runtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ubuntu:14.04
MAINTAINER NVIDIA CORPORATION <[email protected]>

LABEL com.nvidia.volumes.needed="nvidia_driver"

RUN apt-get update && apt-get install -y --no-install-recommends --force-yes \
ocl-icd-libopencl1 \
clinfo && \
rm -rf /var/lib/apt/lists/*

RUN mkdir -p /etc/OpenCL/vendors && \
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd

RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf

ENV PATH /usr/local/nvidia/bin:${PATH}
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:${LD_LIBRARY_PATH}

0 comments on commit 9fdb5f6

Please sign in to comment.