-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de63d3b
commit 6c8e437
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM ubuntu:latest | ||
|
||
COPY minimal-server.jl / | ||
|
||
RUN apt update && \ | ||
DEBIAN_FRONTEND="noninteractive" apt install -y curl | ||
|
||
ENV JULIA_PATH /usr/local/julia | ||
ENV PATH $JULIA_PATH/bin:$PATH | ||
|
||
RUN curl -fsSL https://install.julialang.org | sh -s -- -y | ||
|
||
#CMD julia minimal-server.jl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Pkg | ||
|
||
tempdir = mktempdir() | ||
Pkg.activate(tempdir) | ||
Pkg.add(["UMBridge"]) | ||
|
||
using UMBridge | ||
|
||
testmodel = UMBridge.Model( | ||
name = "forward", | ||
inputSizes = [1], | ||
outputSizes = [1], | ||
supportsGradient = true, | ||
evaluate = (input, config) -> 2 * input[1], | ||
gradient = (outWrt, inWrt, input, sens, config) -> 2 * sens[1] | ||
) | ||
|
||
UMBridge.serve_models([testmodel], 4242) |