Skip to content

Commit 0433c38

Browse files
committed
Updates runtime images
1 parent 28d485b commit 0433c38

5 files changed

Lines changed: 22 additions & 15 deletions

File tree

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,24 @@ serverledge-cli:
1414
executor:
1515
CGO_ENABLED=0 $(GO) build -o $(BIN)/$@ cmd/$@/executor.go
1616

17-
DOCKERHUB_USER=fmuschera
18-
images: image-python310 image-nodejs17ng image-base
19-
image-python310:
20-
docker build -t $(DOCKERHUB_USER)/serverledge-python310 -f images/python310/Dockerfile .
17+
DOCKERHUB_USER=grussorusso
18+
images: image-python image-nodejs17ng image-base image-go
19+
image-python:
20+
docker build -t $(DOCKERHUB_USER)/serverledge-python314 -f images/python314/Dockerfile .
21+
docker build -t $(DOCKERHUB_USER)/serverledge-python312ml -f images/python312ml/Dockerfile .
2122
image-base:
2223
docker build -t $(DOCKERHUB_USER)/serverledge-base -f images/base-alpine/Dockerfile .
2324
image-nodejs17ng:
2425
docker build -t $(DOCKERHUB_USER)/serverledge-nodejs17ng -f images/nodejs17ng/Dockerfile .
26+
image-go:
27+
docker build -t $(DOCKERHUB_USER)/serverledge-go125 -f images/go125/Dockerfile .
2528

2629
push-images:
27-
docker push $(DOCKERHUB_USER)/serverledge-python310
30+
docker push $(DOCKERHUB_USER)/serverledge-python314
2831
docker push $(DOCKERHUB_USER)/serverledge-base
2932
docker push $(DOCKERHUB_USER)/serverledge-nodejs17ng
33+
docker push $(DOCKERHUB_USER)/serverledge-python312ml
34+
docker push $(DOCKERHUB_USER)/serverledge-go125
3035

3136
# Runs integration tests (all tests EXCEPT unit tests)
3237
test:

images/go125/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM alpine:latest
22

3-
COPY entrypoint.sh /entrypoint.sh
3+
COPY images/go125/entrypoint.sh /entrypoint.sh
44
RUN chmod +x /entrypoint.sh
55

66
WORKDIR /app
77

8-
CMD ["/entrypoint.sh"]
8+
CMD ["/entrypoint.sh"]

images/python312ml/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ RUN pip install --no-cache-dir \
2323
scikit-learn \
2424
scipy
2525

26-
COPY executor.py /executor.py
26+
COPY images/python312ml/executor.py /executor.py
27+
RUN mkdir -p /app
2728
WORKDIR /app
2829

29-
CMD ["python3", "/executor.py"]
30+
CMD ["python3", "/executor.py"]

internal/container/runtimes.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ const ARM = "arm64"
1515
var refreshedImages = map[string]bool{}
1616

1717
var RuntimeToInfo = map[string]RuntimeInfo{
18-
"python314": {"fmuschera/serverledge-python314", []string{"python", "/entrypoint.py"}, true, []string{X86, ARM}},
19-
"nodejs17ng": {"fmuschera/serverledge-nodejs17ng", []string{}, false, []string{X86, ARM}},
20-
"java21": {"fmuschera/serverledge-java21", []string{}, false, []string{X86, ARM}},
21-
"go125": {"fmuschera/serverledge-go125", []string{"/entrypoint.sh"}, true, []string{X86, ARM}},
22-
"python-numpy": {"fmuschera/serverledge-python-numpy", []string{"python", "/entrypoint.py"}, true, []string{X86, ARM}},
23-
"python312ml": {"fmuschera/serverledge-python312ml", []string{"python", "/entrypoint.py"}, true, []string{X86, ARM}},
18+
"python314": {"grussorusso/serverledge-python314", []string{"python", "/entrypoint.py"}, true, []string{X86, ARM}},
19+
"nodejs17ng": {"grussorusso/serverledge-nodejs17ng", []string{}, false, []string{X86, ARM}},
20+
"go125": {"grussorusso/serverledge-go125", []string{"/entrypoint.sh"}, true, []string{X86, ARM}},
21+
"python312ml": {"grussorusso/serverledge-python312ml", []string{"python", "/entrypoint.py"}, true, []string{X86, ARM}},
2422
}
2523

2624
// CustomRuntimeToInfo Map to keep track of architectures compatible with each custom runtime image associated with a function registered

utils/etcd.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ func GetEtcdClient() (*clientv3.Client, error) {
3535
cli, err := clientv3.New(clientv3.Config{
3636
Endpoints: []string{etcdHost},
3737
DialTimeout: 3 * time.Second,
38+
// Increase limit to 10MB
39+
MaxCallSendMsgSize: 10 * 1024 * 1024,
40+
MaxCallRecvMsgSize: 10 * 1024 * 1024,
3841
})
3942
if err != nil {
4043
log.Printf("Could not connect to etcd: %v", err)

0 commit comments

Comments
 (0)