-
Notifications
You must be signed in to change notification settings - Fork 0
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
4621af7
commit 6e4efdd
Showing
5 changed files
with
54 additions
and
18 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 |
---|---|---|
@@ -1,31 +1,31 @@ | ||
# Use a base image with Go 1.21.x for pulling the repository and building the application | ||
# Use a base image with Go 1.21.x for building the application | ||
FROM golang:1.21 AS builder | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
|
||
# Copy from local | ||
COPY . . | ||
# Pull the repository | ||
# RUN git clone https://github.com/Livepool-io/livepeer-openai-api-middleware.git . | ||
|
||
# Download all the dependencies | ||
RUN go mod download | ||
|
||
# Build the Go application | ||
RUN go build -o app | ||
# Build the Go application with CGO disabled and statically linked | ||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . | ||
|
||
# Use a minimal base image for running the application | ||
FROM debian:bullseye-slim | ||
FROM alpine:latest | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
# Install ca-certificates | ||
RUN apk --no-cache add ca-certificates | ||
|
||
WORKDIR /root/ | ||
|
||
# Copy the binary from the builder stage | ||
COPY --from=builder /app/app . | ||
|
||
# Expose the port the application runs on | ||
EXPOSE 8080 | ||
|
||
# Set the entry point to run the binary with the gateway flag | ||
ENTRYPOINT ["./app"] | ||
# Set the entry point to run the binary | ||
ENTRYPOINT ["./app"] |
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
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,14 @@ | ||
ethUrl https://arb-mainnet.g.alchemy.com/v2/vMsgfz6xKYg5MTI-o2dhRjrY1J-DlzoG | ||
ethKeystorePath /root/.lpData/keystore | ||
ethPassword /root/.lpData/password.txt | ||
network arbitrum-one-mainnet | ||
gateway true | ||
monitor true | ||
v 99 | ||
blockPollingInterval 20 | ||
maxPricePerUnit 300 | ||
pixelsPerUnit 1 | ||
rtmpAddr 0.0.0.0:1935 | ||
httpAddr 0.0.0.0:8935 | ||
maxTotalEV 100000000000000 | ||
maxPricePerCapability /root/.lpData/maxPrices.json |
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,16 @@ | ||
{ | ||
"capabilities-prices": [ | ||
{ | ||
"pipeline": "llm", | ||
"model_id": "meta-llama/Meta-Llama-3.1-8B-Instruct", | ||
"price_per_unit": 20000000, | ||
"pixels_per_unit": 1000000 | ||
}, | ||
{ | ||
"pipeline": "llm", | ||
"model_id": "meta-llama/Meta-Llama-3.1-70B-Instruct", | ||
"price_per_unit": 80000000, | ||
"pixels_per_unit": 1000000 | ||
} | ||
] | ||
} |
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