# syntax=docker/dockerfile:1 FROM python:3.11 AS base_image # allow user to write files RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH WORKDIR $HOME/app COPY --chown=user . $HOME/app # RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan bitbucket.org >> ~/.ssh/known_hosts # RUN --mount=type=ssh pip install -e git+ssh://git@bitbucket.org/faktionml/autotrain-advanced.git#egg=autotrain-advanced RUN pip install --upgrade pip # install bitsandbytes from source -> using the requirements.txt file for version 0.43.1 raises no matching distribution found for bitsandbytes RUN pip install git+https://github.com/TimDettmers/bitsandbytes.git#egg=bitsandbytes RUN pip install -e git+https://github.com/faktionbe/autotrain-advanced.git#egg=autotrain-advanced FROM base_image EXPOSE 7860 COPY . . RUN pip install -r autotrain/requirements.txt CMD ["python", "autotrain/main.py"]