Skip to content

Commit 36ac248

Browse files
committed
init
0 parents  commit 36ac248

18 files changed

+18570
-0
lines changed

.devcontainer/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM gocv/opencv:4.10.0-gpu-cuda-12
2+
3+
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
4+
&& apt-get -y install --no-install-recommends ffmpeg graphviz

.devcontainer/devcontainer.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-outside-of-docker-compose
3+
{
4+
"name": "Docker from Docker Compose",
5+
"dockerComposeFile": "docker-compose.yml",
6+
"service": "app",
7+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
8+
// Use this environment variable if you need to bind mount your local source code into a new container.
9+
"remoteEnv": {
10+
"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
11+
},
12+
"remoteUser": "vscode",
13+
"features": {
14+
"ghcr.io/devcontainers/features/common-utils:2": {
15+
"installZsh": false,
16+
"configureZshAsDefaultShell": false,
17+
"installOhMyZshConfig": false,
18+
"userUid": 1000,
19+
"userGid": 1000,
20+
"upgradePackages": false
21+
},
22+
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
23+
"version": "latest",
24+
"enableNonRootDocker": true,
25+
"moby": true
26+
},
27+
"ghcr.io/devcontainers/features/go:1": {
28+
"version": "1.22"
29+
}
30+
},
31+
"privileged": true,
32+
"hostRequirements": {
33+
"gpu": true
34+
}
35+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
36+
// "forwardPorts": [],
37+
// Use 'postCreateCommand' to run commands after the container is created.
38+
// "postCreateCommand": "docker --version",
39+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
40+
// "remoteUser": "root"
41+
}

.devcontainer/docker-compose.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: '3'
2+
3+
services:
4+
app:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
9+
volumes:
10+
# Forwards the local Docker socket to the container.
11+
- /var/run/docker.sock:/var/run/docker-host.sock
12+
# Update this to wherever you want VS Code to mount the folder of your project
13+
- ../..:/workspaces:cached
14+
15+
# Overrides default command so things don't shut down after the process ends.
16+
entrypoint: /usr/local/share/docker-init.sh
17+
command: sleep infinity
18+
19+
# Uncomment the next four lines if you will use a ptrace-based debuggers like C++, Go, and Rust.
20+
# cap_add:
21+
# - SYS_PTRACE
22+
# security_opt:
23+
# - seccomp:unconfined
24+
25+
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
26+
# (Adding the "ports" property to this file will not forward from a Codespace.)

.github/dependabot.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for more information:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
# https://containers.dev/guide/dependabot
6+
7+
version: 2
8+
updates:
9+
- package-ecosystem: "devcontainers"
10+
directory: "/"
11+
schedule:
12+
interval: weekly

Makefile

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
PROTOC_VERSION=27.2
2+
3+
.PHONY: protoc
4+
protoc:
5+
wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip
6+
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip -d protoc-${PROTOC_VERSION}
7+
mv protoc-${PROTOC_VERSION}/bin/protoc /usr/local/bin/
8+
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
9+
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
10+
11+
.PHONY: gen-proto
12+
gen-proto:
13+
protoc --proto_path=protobuf/proto --go_out=protobuf --go-grpc_out=protobuf --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative protobuf/proto/*.proto

docker-compose.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
services:
2+
tritonserver:
3+
container_name: tritonserver
4+
image: nvcr.io/nvidia/tritonserver:24.05-py3
5+
command: tritonserver --model-repository=/models
6+
ports:
7+
- 8000:8000
8+
- 8001:8001
9+
- 8002:8002
10+
volumes:
11+
- ${LOCAL_WORKSPACE_FOLDER}/model_repository:/models
12+
privileged: true
13+
deploy:
14+
resources:
15+
reservations:
16+
devices:
17+
- capabilities: [gpu]

go.mod

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module github.com/dev6699/face
2+
3+
go 1.22.4
4+
5+
require (
6+
google.golang.org/grpc v1.64.0
7+
google.golang.org/protobuf v1.34.2
8+
)
9+
10+
require (
11+
golang.org/x/net v0.22.0 // indirect
12+
golang.org/x/sys v0.18.0 // indirect
13+
golang.org/x/text v0.14.0 // indirect
14+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
15+
)

go.sum

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
2+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
3+
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
4+
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
5+
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
6+
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
7+
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
8+
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
9+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc=
10+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
11+
google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY=
12+
google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg=
13+
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
14+
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=

model_repository/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
model.onnx

0 commit comments

Comments
 (0)