-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
24 lines (18 loc) · 666 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM golang:1.20.3
# Set environment variables
ENV PATH="/root/.cargo/bin:${PATH}"
ENV USER=root
# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& rustup default stable \
&& rustup target add x86_64-unknown-linux-gnu
WORKDIR /go/src
RUN ln -sf /bin/bash /bin/sh
COPY go.mod go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN cd /go/pkg/mod/github.com/j178/[email protected]/tiktoken-cffi && \
cargo build --release
RUN apt update && apt install -y protobuf-compiler && apt install -y protoc-gen-go
RUN go install google.golang.org/grpc/cmd/[email protected]
CMD [ "tail", "-f", "/dev/null" ]