Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ApiToKafkaBill
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟@五瓣科技
ApiToKafkaBill
Commits
7967213e
Commit
7967213e
authored
Feb 02, 2024
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add docker file
parent
180276e9
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
379 additions
and
97 deletions
+379
-97
dockerfile
dockerfile
+40
-0
docs.go
docs/docs.go
+0
-0
swagger.json
docs/swagger.json
+108
-0
swagger.yaml
docs/swagger.yaml
+0
-0
swagger.json
docs/v1/swagger.json
+0
-7
main.go
main.go
+231
-90
No files found.
dockerfile
0 → 100644
View file @
7967213e
FROM
golang:1.21.3 AS base
#FROM golang:1.20.6-alpine3.18 AS base
#FROM golang:1.21.3 AS base
#FROM golang:1.20.6-alpine3.18 AS build
WORKDIR
/go/src/github.com/odysseus/
ENV
https_proxy 'http://192.168.1.180:1080'
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN
mkdir
-p
./go-kafka/
COPY
./ ./go-kafka
COPY
./payment ./payment
COPY
./odysseus-protocol ./odysseus-protocol
#RUN pwd && ls && sleep 10
# RUN go mod tidy
#RUN go build -o /go-kafka
RUN
cd
go-kafka
&&
go mod tidy
&&
go build
-o
/ai-api-mgr
RUN
ls
/ai-api-mgr
&&
sleep
30
FROM
alpine
WORKDIR
/root
RUN
ls
/usr/bin/
&&
sleep
10
COPY
--from=base /ai-api-mgr /usr/bin/
RUN
ls
/usr/bin/ai-api-mgr
&&
sleep
10
#/usr/bin/go-kafka
# Add entrypoint script
#COPY ./scripts/entrypoint.sh /usr/local/bin/entrypoint.sh
#RUN chmod u+x /usr/local/bin/entrypoint.sh
docs/
v1/
docs.go
→
docs/docs.go
View file @
7967213e
File moved
docs/swagger.json
0 → 100644
View file @
7967213e
{
"swagger"
:
"2.0"
,
"info"
:
{
"title"
:
"GPU+Model service"
,
"version"
:
"1.0.0"
},
"paths"
:
{
"/{TaskType}"
:
{
"post"
:
{
"summary"
:
"customer private api"
,
"operationId"
:
"place a task"
,
"parameters"
:
[
{
"name"
:
"TaskType"
,
"in"
:
"path"
,
"required"
:
true
,
"type"
:
"string"
,
"default"
:
"startdocker"
},
{
"name"
:
"apikey"
,
"in"
:
"header"
,
"required"
:
true
,
"type"
:
"string"
,
"maxLength"
:
32
,
"default"
:
"YNExx9qR8aBoZuxfNTBCDkVJ3EiedIma"
},
{
"in"
:
"body"
,
"schema"
:{
"$ref"
:
"#/definitions/ReqTask"
},
"examples"
:{
"modelType"
:{
"value"
:
"language"
},
"model"
:{
"value"
:
"chat"
}
}
}
],
"responses"
:
{
"200"
:
{
"description"
:
"success"
,
"schema"
:
{
"$ref"
:
"#/definitions/User"
}
}
}
}
},
"/callback"
:
{
"post"
:
{}
}
},
"definitions"
:
{
"ReqTask"
:{
"type"
:
"object"
,
"properties"
:
{
"modelType"
:
{
"type"
:
"string"
},
"model"
:{
"type"
:
"string"
},
"desc"
:{
"type"
:
"string"
},
"token"
:{
"type"
:
"string"
}
}
},
"User"
:
{
"type"
:
"object"
,
"properties"
:
{
"id"
:
{
"type"
:
"integer"
,
"format"
:
"int64"
},
"username"
:
{
"type"
:
"string"
},
"email"
:
{
"type"
:
"string"
}
}
},
"Error"
:
{
"type"
:
"object"
,
"properties"
:
{
"code"
:
{
"type"
:
"integer"
,
"format"
:
"int32"
},
"message"
:
{
"type"
:
"string"
}
}
}
}
}
docs/
v1/
swagger.yaml
→
docs/swagger.yaml
View file @
7967213e
File moved
docs/v1/swagger.json
deleted
100644 → 0
View file @
180276e9
{
"swagger"
:
"2.0"
,
"info"
:
{
"contact"
:
{}
},
"paths"
:
{}
}
\ No newline at end of file
main.go
View file @
7967213e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment