tebakaja commited on
Commit
c13638f
·
1 Parent(s): 0dcd682

deployment

Browse files
Files changed (2) hide show
  1. Dockerfile +17 -14
  2. main.go +1 -1
Dockerfile CHANGED
@@ -1,7 +1,6 @@
1
  FROM golang:1.21.13-alpine3.20
2
 
3
  LABEL creator="al-fariqy raihan"
4
- LABEL npm="202143501514"
5
 
6
  ENV APP_DIR=/thesis_forecasting_website \
7
  GO111MODULE=on \
@@ -11,6 +10,8 @@ WORKDIR ${APP_DIR}
11
 
12
  RUN apk add --no-cache git git-lfs curl \
13
  && git lfs install
 
 
14
  # ENV TZ=Asia/Jakarta
15
 
16
  COPY go.mod go.sum ./
@@ -25,19 +26,21 @@ RUN go build -o main . \
25
  && go clean -modcache \
26
  && rm -rf /root/.cache/go-build /root/go/pkg
27
 
28
- RUN wget https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-1.21.0.tgz && \
29
- tar -xvzf onnxruntime-linux-x64-1.21.0.tgz && \
30
- rm -rf onnxruntime-linux-x64-1.21.0.tgz
31
-
32
- RUN git lfs install && \
33
- git clone https://huggingface.co/datasets/qywok/indonesia_stocks && \
34
- mkdir -p models && \
35
- for i in $(seq 1 10); do \
36
- git clone https://huggingface.co/qywok/stock_models_$i && \
37
- cd stock_models_$i && git lfs pull && cd .. && \
38
- mv stock_models_$i/*.onnx models/ && \
39
- rm -rf stock_models_$i; \
40
- done
 
 
41
 
42
  RUN chmod -R 755 ${APP_DIR}
43
 
 
1
  FROM golang:1.21.13-alpine3.20
2
 
3
  LABEL creator="al-fariqy raihan"
 
4
 
5
  ENV APP_DIR=/thesis_forecasting_website \
6
  GO111MODULE=on \
 
10
 
11
  RUN apk add --no-cache git git-lfs curl \
12
  && git lfs install
13
+
14
+ # RUN apk add --no-cache tzdata
15
  # ENV TZ=Asia/Jakarta
16
 
17
  COPY go.mod go.sum ./
 
26
  && go clean -modcache \
27
  && rm -rf /root/.cache/go-build /root/go/pkg
28
 
29
+ # RUN wget https://github.com/microsoft/onnxruntime/releases/download/v1.21.0/onnxruntime-linux-x64-1.21.0.tgz && \
30
+ # tar -xvzf onnxruntime-linux-x64-1.21.0.tgz && \
31
+ # rm -rf onnxruntime-linux-x64-1.21.0.tgz
32
+
33
+ RUN git clone https://huggingface.co/datasets/qywok/indonesia_stocks
34
+
35
+ # RUN git lfs install && \
36
+ # git clone https://huggingface.co/datasets/qywok/indonesia_stocks && \
37
+ # mkdir -p models && \
38
+ # for i in $(seq 1 10); do \
39
+ # git clone https://huggingface.co/qywok/stock_models_$i && \
40
+ # cd stock_models_$i && git lfs pull && cd .. && \
41
+ # mv stock_models_$i/*.onnx models/ && \
42
+ # rm -rf stock_models_$i; \
43
+ # done
44
 
45
  RUN chmod -R 755 ${APP_DIR}
46
 
main.go CHANGED
@@ -37,7 +37,7 @@ func main() {
37
 
38
  forecasting_service.Get("/", handlers.IssuerHandler)
39
  forecasting_service.Get("/infographic", handlers.InfographicHandler)
40
- forecasting_service.Post("/prediction", inferences.StockPredictionHandler)
41
 
42
  host := os.Getenv("FORECASTING_SERVICE_HOST")
43
  port := os.Getenv("FORECASTING_SERVICE_PORT")
 
37
 
38
  forecasting_service.Get("/", handlers.IssuerHandler)
39
  forecasting_service.Get("/infographic", handlers.InfographicHandler)
40
+ // forecasting_service.Post("/prediction", inferences.StockPredictionHandler)
41
 
42
  host := os.Getenv("FORECASTING_SERVICE_HOST")
43
  port := os.Getenv("FORECASTING_SERVICE_PORT")