deployment
Browse files- Dockerfile +12 -14
Dockerfile
CHANGED
|
@@ -11,8 +11,8 @@ WORKDIR ${APP_DIR}
|
|
| 11 |
RUN apk add --no-cache git git-lfs curl \
|
| 12 |
&& git lfs install
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
COPY go.mod go.sum ./
|
| 18 |
RUN go mod download
|
|
@@ -26,21 +26,19 @@ RUN go build -o main . \
|
|
| 26 |
&& go clean -modcache \
|
| 27 |
&& rm -rf /root/.cache/go-build /root/go/pkg
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
|
| 33 |
RUN git clone https://huggingface.co/datasets/qywok/indonesia_stocks
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
# rm -rf stock_models_$i; \
|
| 43 |
-
# done
|
| 44 |
|
| 45 |
RUN chmod -R 755 ${APP_DIR}
|
| 46 |
|
|
|
|
| 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 ./
|
| 18 |
RUN go mod download
|
|
|
|
| 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 mkdir -p models && \
|
| 36 |
+
for i in $(seq 1 10); do \
|
| 37 |
+
git clone https://huggingface.co/qywok/stock_models_$i && \
|
| 38 |
+
cd stock_models_$i && git lfs pull && cd .. && \
|
| 39 |
+
mv stock_models_$i/*.onnx models/ && \
|
| 40 |
+
rm -rf stock_models_$i; \
|
| 41 |
+
done
|
|
|
|
|
|
|
| 42 |
|
| 43 |
RUN chmod -R 755 ${APP_DIR}
|
| 44 |
|