-
Notifications
You must be signed in to change notification settings - Fork 3
/
app.Dockerfile
34 lines (26 loc) · 1.05 KB
/
app.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
FROM nvidia/cuda:11.2.0-base
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install --no-install-recommends --no-install-suggests -y curl python3.8 python3-pip python3.8-dev \
awscli build-essential mysql-client libmysqlclient-dev \
&& rm -rf /var/lib/apt/lists/*
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_HOME="/opt/poetry" \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=true \
VENV_PATH="/opt/pysetup/.venv"\
POETRY_VIRTUALENVS_CREATE=false
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
ENV POETRY_VERSION=1.1.4
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3.8
WORKDIR /repalette
COPY ./poetry.lock ./pyproject.toml ./
RUN poetry install --no-dev
COPY . ./
RUN poetry install --no-dev
ARG MAX_IMAGE_SIZE="2073600"
ENV MAX_IMAGE_SIZE=${MAX_IMAGE_SIZE}
CMD ["uvicorn", "app.app:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]