Skip to content

Commit

Permalink
Merge pull request #62 from levyfan/master
Browse files Browse the repository at this point in the history
add python devel docker file
  • Loading branch information
levyfan authored Dec 24, 2019
2 parents f0182b4 + 247e6b7 commit d56a264
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.7)
cmake_minimum_required(VERSION 3.6)
project(cuBERT VERSION 0.0.4 LANGUAGES C CXX)

set(CMAKE_CXX_STANDARD 11)
Expand Down
21 changes: 21 additions & 0 deletions devel-py.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM quay.io/pypa/manylinux2010_x86_64

WORKDIR /usr/src/cuBERT
COPY . .

RUN yum -y install \
cmake3 \
&& \
yum -y clean all && \
rm -rf /var/cache/yum/*

RUN rm -rf build && mkdir build && cd build && \
cmake3 -DCMAKE_BUILD_TYPE=Release -DcuBERT_ENABLE_MKL_SUPPORT=ON .. && \
make

RUN /opt/python/cp36-cp36m/bin/pip install Cython numpy
RUN /opt/python/cp27-cp27m/bin/pip install Cython numpy

RUN cd python && \
/opt/python/cp36-cp36m/bin/python setup.py bdist_wheel && \
/opt/python/cp27-cp27m/bin/python setup.py bdist_wheel
2 changes: 0 additions & 2 deletions test/cuBERT/BertMTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "gtest/gtest.h"

#include "common_test.h"
#include "cuBERT/BertM.h"
using namespace cuBERT;
Expand Down
1 change: 0 additions & 1 deletion test/cuBERT/BertTest.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "gtest/gtest.h"
#include <unordered_map>

#include "common_test.h"
Expand Down
2 changes: 0 additions & 2 deletions test/cuBERT/common_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "gtest/gtest.h"

#include "common_test.h"

TEST_F(CommonTest, memcpy) {
Expand Down
3 changes: 2 additions & 1 deletion test/cuBERT/common_test.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#ifndef CUBERT_COMMON_TEST_H
#define CUBERT_COMMON_TEST_H

#include "gtest/gtest.h"
#include <cstdlib>
#include <cstring>

#include "cuBERT/common.h"

#include "gtest/gtest.h"

class CommonTest : public ::testing::Test {
protected:
void SetUp() override {
Expand Down
2 changes: 0 additions & 2 deletions test/cuBERT/op/DenseTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "gtest/gtest.h"

#include "../common_test.h"
#include "cuBERT/op/Dense.h"
using namespace cuBERT;
Expand Down
2 changes: 0 additions & 2 deletions test/cuBERT/op/EmbeddingTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "gtest/gtest.h"

#include "../common_test.h"
#include "cuBERT/op/Embedding.h"
using namespace cuBERT;
Expand Down
1 change: 0 additions & 1 deletion test/cuBERT/op/GELUTest.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "gtest/gtest.h"
#include <cmath>

#include "../common_test.h"
Expand Down
1 change: 0 additions & 1 deletion test/cuBERT/op/LayerNormTest.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "gtest/gtest.h"
#include <cmath>

#include "../common_test.h"
Expand Down
2 changes: 0 additions & 2 deletions test/cuBERT/op/SoftmaxTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "gtest/gtest.h"

#include "../common_test.h"
#include "cuBERT/op/Softmax.h"
using namespace cuBERT;
Expand Down
2 changes: 0 additions & 2 deletions test/cuBERT/op_att/AttentionMaskTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "gtest/gtest.h"

#include "../common_test.h"
#include "cuBERT/op_att/AttentionMask.h"
using namespace cuBERT;
Expand Down
1 change: 0 additions & 1 deletion test/cuBERT/op_att/AttentionSelfTest.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "gtest/gtest.h"
#include <algorithm>

#include "../common_test.h"
Expand Down
2 changes: 0 additions & 2 deletions test/cuBERT/op_att/BatchMatMulTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "gtest/gtest.h"

#include "../common_test.h"
#include "cuBERT/op_att/BatchMatMul.h"
using namespace cuBERT;
Expand Down
1 change: 0 additions & 1 deletion test/cuBERT/op_att/TransformerTest.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "gtest/gtest.h"
#include <algorithm>

#include "../common_test.h"
Expand Down
1 change: 0 additions & 1 deletion test/cuBERT/op_bert/BertEmbeddingsTest.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "gtest/gtest.h"
#include <cmath>

#include "../common_test.h"
Expand Down
1 change: 0 additions & 1 deletion test/cuBERT/op_bert/BertPoolerTest.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "gtest/gtest.h"
#include <cmath>

#include "../common_test.h"
Expand Down
2 changes: 0 additions & 2 deletions test/cuBERT/op_out/AdditionalOutputLayerTest.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "gtest/gtest.h"

#include "../common_test.h"
#include "cuBERT/op_out/AdditionalOutputLayer.h"
using namespace cuBERT;
Expand Down

0 comments on commit d56a264

Please sign in to comment.