-
Notifications
You must be signed in to change notification settings - Fork 1
/
dev.Dockerfile
35 lines (26 loc) · 1.04 KB
/
dev.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
FROM python:3.10-slim
LABEL authors="Oleksandr Khoroshevskyi, Nathan Sheffield"
RUN apt-get update
RUN apt-get install -y gcc
RUN apt-get install -y libpq-dev
RUN apt-get install -y --no-install-recommends git
# RUN apt-get update -y && \
# apt-get install -y libpq-dev && \ # for postgres backend
# apt-get install -y gcc && \
# apt-get install -y wget && \
# apt-get install -y libcurl4 && \
# cpp compiler required for hsnwlib
EXPOSE 80
EXPOSE 6333
WORKDIR /app
COPY . /app
RUN python -m pip install --upgrade pip
# Need this command due to geniml dependency on hnswlib
ENV HNSWLIB_NO_NATIVE=1
RUN apt-get install -y python3-dev
RUN apt-get install -y build-essential
# Install CPU-only pytorch, eliminating huge nvidia dependencies
RUN pip install torch==2.3.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
RUN pip install https://github.com/pepkit/pipestat/archive/refs/heads/dev.zip
RUN pip install -r requirements/requirements-all.txt --no-cache-dir
CMD ["uvicorn", "bedhost.main:app", "--host", "0.0.0.0", "--port", "80"]