|
FROM nvidia/cuda:12.2.0-base-ubuntu20.04 |
|
|
|
ARG DEBIAN_FRONTEND=noninteractive |
|
|
|
RUN apt-get update \ |
|
&& apt-get install \ |
|
curl wget python3.10 \ |
|
python3.10-distutils \ |
|
python3-pip \ |
|
curl wget -y \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
ENV DEVICE="cuda" |
|
|
|
COPY ./gpu-requirements.txt ./requirements.txt |
|
COPY ./src /app |
|
COPY ./scripts/start.sh /start.sh |
|
COPY ./scripts/gunicorn_conf.py /gunicorn_conf.py |
|
COPY ./scripts/start-reload.sh /start-reload.sh |
|
COPY ./scripts/prestart.sh /app |
|
COPY ./VERSION / |
|
RUN mkdir -p /app/resources/model \ |
|
&& pip install --upgrade --no-cache-dir -r requirements.txt \ |
|
&& chmod +x /start.sh \ |
|
&& chmod +x /start-reload.sh |
|
ARG MODEL_NAME_OR_PATH |
|
|
|
WORKDIR /app |
|
|
|
ENV PYTHONPATH=/app |
|
|
|
EXPOSE 80 |
|
|
|
|
|
|
|
CMD ["/start.sh"] |
|
|