Commit 7967213e authored by Your Name's avatar Your Name

add docker file

parent 180276e9
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
{
"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"
}
}
}
}
}
{
"swagger": "2.0",
"info": {
"contact": {}
},
"paths": {}
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment