38 lines
998 B
Docker
38 lines
998 B
Docker
|
|
# syntax=docker/dockerfile:1
|
||
|
|
|
||
|
|
FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
|
||
|
|
|
||
|
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||
|
|
PYTHONDONTWRITEBYTECODE=1 \
|
||
|
|
PYTHONUNBUFFERED=1 \
|
||
|
|
PIP_NO_CACHE_DIR=1
|
||
|
|
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
RUN apt-get update \
|
||
|
|
&& apt-get install -y --no-install-recommends \
|
||
|
|
python3 \
|
||
|
|
python3-pip \
|
||
|
|
python3-venv \
|
||
|
|
git \
|
||
|
|
curl \
|
||
|
|
ca-certificates \
|
||
|
|
tini \
|
||
|
|
&& ln -sf /usr/bin/python3 /usr/local/bin/python \
|
||
|
|
&& ln -sf /usr/bin/pip3 /usr/local/bin/pip \
|
||
|
|
&& rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
COPY compute/requirements.txt /tmp/requirements.txt
|
||
|
|
RUN pip install --upgrade pip \
|
||
|
|
&& pip install -r /tmp/requirements.txt \
|
||
|
|
&& rm -f /tmp/requirements.txt
|
||
|
|
|
||
|
|
RUN mkdir -p /opt/yg-ft/logs/compute /opt/yg-ft/logs/training /data/yg-ft /opt/LLaMA-Factory \
|
||
|
|
&& chmod -R 0775 /opt/yg-ft /data/yg-ft /opt/LLaMA-Factory
|
||
|
|
|
||
|
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||
|
|
|
||
|
|
EXPOSE 9100
|
||
|
|
|
||
|
|
CMD ["uvicorn", "compute.api.main:app", "--host", "0.0.0.0", "--port", "9100"]
|