-
Notifications
You must be signed in to change notification settings - Fork 90
/
Dockerfile
24 lines (17 loc) · 909 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
FROM python:3.11-slim-bullseye
# Allow statements and log messages to immediately appear in the Knative logs
ENV PYTHONUNBUFFERED True
# Adds GCC and other build tools so we can compile hnswlib and other native/C++ deps.
RUN apt-get update --fix-missing && apt-get install -y --fix-missing build-essential && \
rm -rf /var/lib/apt/lists/*
# Set the working directory in the container.
WORKDIR /app
# To reduce the image size, replace lilac[all] with lilac[...] optional deps.
RUN python -m pip install lilac[all]
# Install from the local wheel inside ./dist. This will be a no-op if the wheel is not found.
COPY --chown=user /dis[t] ./dist/
RUN python -m pip install --find-links=dist --upgrade lilac[all]
COPY LICENSE .
# Google cloud does not support -p forwarding, so we pass port 80 as an argument in the config.
EXPOSE 80
CMD ["uvicorn", "lilac.server:app", "--host", "0.0.0.0", "--port", "80"]