File size: 916 Bytes
6c651c8
 
 
38af30c
 
 
 
 
 
 
 
 
81e6941
 
 
c5f2e1b
81e6941
 
 
6c651c8
 
 
 
 
 
db6f069
6c651c8
db6f069
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
27
28
# 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"]