File size: 809 Bytes
e4f9cbe
 
 
 
 
 
 
29c64ea
e4f9cbe
bb6ad73
 
 
 
 
e4f9cbe
b4ce410
e4f9cbe
 
 
56cce61
e4f9cbe
e9a1c18
 
 
8e61415
56cce61
a3d98b1
8e61415
 
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
# NOTE: When we upgrade to 3.11 we can use a slimmer docker image which comes with gcc.
FROM python:3.9-bullseye

# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True

# Set the working directory in the container.
WORKDIR /server

# Install the dependencies. This requires exporting requirements.txt from poetry first, which
# happens from ./build_docker.sh.
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY .env .
COPY .env.demo .
COPY LICENSE .

# Copy python files.
COPY /lilac ./lilac/

# Copy the data files. We use glob so docker copy won't fail if the directory doesn't exist.
COPY /dat[a] ./data/

CMD [ \
  "gunicorn", "lilac.server:app", \
  "--bind", "0.0.0.0:5432", \
  "-k", "uvicorn.workers.UvicornWorker" \
  ]