-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
42 lines (35 loc) · 1.13 KB
/
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
# CUDA 12.0.1
# Ubuntu 22.04
# Python 3.10
# Nodejs 22
FROM nvcr.io/nvidia/cuda:12.0.1-runtime-ubuntu22.04
ARG DEADSNAKES_PPA_KEY="F23C5A6CF475977595C89F51BA6932366A755776"
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC
# Setup apt sources (nodejs and python)
RUN echo " \
deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main \
deb-src https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" >> /etc/apt/sources.list
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $DEADSNAKES_PPA_KEY
# Install system dependencies
RUN apt update -y
RUN apt install -y \
curl \
wget \
make \
python3.10
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash
RUN apt install -y nodejs
# Setup python and poetry
RUN ln -s /usr/bin/python3.10 /usr/bin/python
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python
RUN curl -sSL https://install.python-poetry.org | python
ENV PATH=$PATH:/root/.local/bin
# Setup app
WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-root --no-directory
COPY . .
RUN make web
EXPOSE 8005 8006
CMD ["python", "graphbook/main.py", "--web_dir", "web/dist"]