|
|
|
|
|
FROM docker.io/library/python:3.10@sha256:4585309097d523698d382a2de388340896e021319b327e2d9c028f3b4c316138 |
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y fakeroot && \ |
|
|
mv /usr/bin/apt-get /usr/bin/.apt-get && \ |
|
|
echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get "$@"' > /usr/bin/apt-get && \ |
|
|
chmod +x /usr/bin/apt-get && \ |
|
|
rm -rf /var/lib/apt/lists/* && \ |
|
|
useradd -m -u 1000 user |
|
|
|
|
|
|
|
|
COPY --chown=1000:1000 --from=root / / |
|
|
|
|
|
WORKDIR /home/user/app |
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
|
git \ |
|
|
git-lfs \ |
|
|
ffmpeg \ |
|
|
libsm6 \ |
|
|
libxext6 \ |
|
|
libgl1 \ |
|
|
cmake \ |
|
|
rsync \ |
|
|
build-essential \ |
|
|
python3-dev \ |
|
|
ninja-build \ |
|
|
&& rm -rf /var/lib/apt/lists/* \ |
|
|
&& git lfs install |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir -U pip && \ |
|
|
pip install --no-cache-dir \ |
|
|
datasets \ |
|
|
"huggingface-hub>=0.19" \ |
|
|
"hf_xet>=1.0.0,<2.0.0" \ |
|
|
"hf-transfer>=0.1.4" \ |
|
|
"protobuf<4" |
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y curl && \ |
|
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ |
|
|
apt-get install -y nodejs && \ |
|
|
rm -rf /var/lib/apt/lists/* && apt-get clean |
|
|
|
|
|
|
|
|
|
|
|
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt \ |
|
|
pip install --no-cache-dir -r /tmp/requirements.txt |
|
|
|