Skip to content

Commit 2dfd0f1

Browse files
committed
Merge branch 'dev' into 'master'
Adding a formal way to contribute to the project See merge request arm-research/smarter/smarter-device-manager!14
2 parents 7eb7526 + 841471d commit 2dfd0f1

File tree

7 files changed

+33
-12
lines changed

7 files changed

+33
-12
lines changed

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Contributing to SMARTER
2+
3+
SMARTER is an open-source, software platform for the Edge. Contributions are an important part of the platform, and our goal is to make it as simple as possible to become a contributor.
4+
5+
# Project license, and developer certificate of origin
6+
7+
The SMARTER codebase is licensed under the Apache 2.0 open source license, individual components may have their own licenses.
8+
Please see the LICENSE file in the SMARTER documentation repository for the full text of this license, or the LICENSE file
9+
in respective repositories. New contributions are expected to be lisensed under the Apache 2.0 license or something compatible
10+
with that license.
11+
12+
Please note that we expect contributors to the project to self-certify that they are authorized to contribute code
13+
using the Linux Foundation's Developer Certificate of Origin. See http://developercertificate.org for more details.
14+
15+
Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.
16+
Pull requests for contributions without a signed-off-by line will not be accepted.

CONTRIBUTIONS

Lines changed: 0 additions & 4 deletions
This file was deleted.

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ RUN apk update && apk upgrade && apk add tar ca-certificates build-base
55
ENV GOPATH /go
66
RUN go version
77

8-
WORKDIR /go/src/smarter-device-management
8+
WORKDIR /arm.com/smarter-device-management
99
COPY . .
1010

1111
RUN echo $PATH;export CGO_LDFLAGS_ALLOW='-Wl,--unresolved-symbols=ignore-in-object-files' && \
12-
go install -ldflags="-s -w" -v smarter-device-management
12+
go mod init arm.com/smarter-device-management && go mod tidy && go mod vendor && \
13+
go build -ldflags="-s -w" .
1314

1415
FROM alpine
1516

@@ -18,6 +19,6 @@ RUN apk update && apk upgrade
1819
WORKDIR /root
1920

2021
COPY conf.yaml /root/config/conf.yaml
21-
COPY --from=build /go/bin/smarter-device-management /usr/bin/smarter-device-management
22+
COPY --from=build /arm.com/smarter-device-management/smarter-device-management /usr/bin/smarter-device-management
2223

23-
CMD ["smarter-device-management","-logtostderr=true","-v=0"]
24+
CMD ["smarter-device-management","-logtostderr=true","-v=0"]

argus.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package main
44

55
import (
66
"github.com/golang/glog"
7-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1"
7+
pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1"
88
)
99

1010
func check(err error) {

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/fsnotify/fsnotify"
1515
"github.com/golang/glog"
1616
"gopkg.in/yaml.v2"
17-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1"
17+
pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1"
1818
)
1919

2020
var confFileName string

nvidia-server.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/golang/glog"
1414
"golang.org/x/net/context"
1515
"google.golang.org/grpc"
16-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1"
16+
pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1"
1717
)
1818

1919
var passDeviceSpecs = flag.Bool("pass-device-specs", false, "pass the list of DeviceSpecs to the kubelet on Allocate()")
@@ -182,6 +182,10 @@ func (m *NvidiaDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreSt
182182
return &pluginapi.PreStartContainerResponse{}, nil
183183
}
184184

185+
func (m *NvidiaDevicePlugin) GetPreferredAllocation(context.Context, *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error) {
186+
return &pluginapi.PreferredAllocationResponse{}, nil
187+
}
188+
185189
func (m *NvidiaDevicePlugin) cleanup() error {
186190
if err := os.Remove(m.socket); err != nil && !os.IsNotExist(err) {
187191
return err

server.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/golang/glog"
1414
"golang.org/x/net/context"
1515
"google.golang.org/grpc"
16-
pluginapi "k8s.io/kubernetes/pkg/kubelet/apis/deviceplugin/v1beta1"
16+
pluginapi "k8s.io/kubelet/pkg/apis/deviceplugin/v1beta1"
1717
)
1818

1919
const (
@@ -180,6 +180,10 @@ func (m *SmarterDevicePlugin) PreStartContainer(context.Context, *pluginapi.PreS
180180
return &pluginapi.PreStartContainerResponse{}, nil
181181
}
182182

183+
func (m *SmarterDevicePlugin) GetPreferredAllocation(context.Context, *pluginapi.PreferredAllocationRequest) (*pluginapi.PreferredAllocationResponse, error) {
184+
return &pluginapi.PreferredAllocationResponse{}, nil
185+
}
186+
183187
func (m *SmarterDevicePlugin) cleanup() error {
184188
glog.V(0).Info("Removing file ",m.socket)
185189
if err := os.Remove(m.socket); err != nil && !os.IsNotExist(err) {

0 commit comments

Comments
 (0)