-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile2
More file actions
26 lines (17 loc) · 920 Bytes
/
Dockerfile2
File metadata and controls
26 lines (17 loc) · 920 Bytes
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
###1
FROM python:3.8
RUN apt update && \
apt install --no-install-recommends -y build-essential software-properties-common && \
# add-apt-repository -y ppa:deadsnakes/ppa && \
# apt install --no-install-recommends -y python3.8 python3-pip python3-setuptools python3-distutils && \
apt install ffmpeg libsm6 libxext6 -y && \
apt clean && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY src /app/src
COPY models/yolact/best_model.pth /app/models/yolact/best_model.pth
COPY requirements.txt /app/requirements.txt
RUN --mount=type=cache,target=/root/.cache \
# python3.8 -m pip install --upgrade pip && \
python3.8 -m pip install --no-cache-dir -r /app/requirements.txt
# python3.8 -m pip install torch==1.10.1+cu113 torchvision==0.11.2+cu113 torchaudio==0.10.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
CMD ["uvicorn", "src.api.api:app", "--host", "0.0.0.0"]