-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (33 loc) · 894 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM julia:1.9 AS builder
RUN apt-get update
ENV DEBIAN_FRONTEND noninteractive
RUN yes | apt-get install git gcc
# Set the JULIA_PKG_USE_CLI_GIT environment variable
ENV JULIA_PKG_USE_CLI_GIT=true
ARG DATASTORE
ARG ES_HOST
ARG ES_PORT
ARG OPENAI_API_KEY
COPY . /opt/app
WORKDIR /opt/app
RUN git config url.ssh://git@github.com/.insteadOf https://github.com/
RUN julia --startup-file=no --project=@. -e '\
import Pkg;\
Pkg.instantiate();\
'
RUN ./precompile.sh
# -----------------------------------------------------------------------------
FROM julia:1.9 AS runtime
ENV HOST 0.0.0.0
ENV PORT 3333
EXPOSE 3333
COPY --from=builder /root/.julia/ /root/.julia/
COPY --from=builder /opt/app/ /opt/app/
WORKDIR /opt/app/
CMD ["julia", \
"--threads=auto", \
"--sysimage=sysimage/sysimage.so", \
"--startup-file=no", \
"--project=@.", \
"./ws_run.jl" \
]