Base-Images/docker/Dockerfile
KIMB-technologies fa36f93466
Some checks failed
Build and push Docker image in git push / build (push) Failing after 6m39s
Arm64 builds locally
2024-10-04 16:19:09 +02:00

52 lines
1.3 KiB
Docker

ARG FROM_IMAGE
FROM $FROM_IMAGE
ARG H_GID
ARG H_UID
ARG PIP_REQ_FILE
RUN apt update && \
DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y tzdata \
&& cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime \
&& echo "Europe/Berlin" > /etc/timezone
RUN apt install -y bash \
build-essential \
git \
curl \
ca-certificates \
python3-dev \
python3-pip
RUN ln -s /usr/bin/python3 /usr/local/bin/python \
&& addgroup --gid $H_GID user \
&& adduser user --uid $H_UID --ingroup user --gecos "" --home /home/user/ --disabled-password
RUN apt-get update \
&& apt-get install -y \
bash nano vim mc \
curl wget \
htop screen
RUN python3 -m pip install --no-cache-dir --break-system-packages \
torch --index-url https://download.pytorch.org/whl/cpu
RUN mkdir /ums-agenten/
ENV NLTK_DATA=/ums-agenten/nltk/
ENV HF_HOME=/ums-agenten/hf_home/
COPY ./docker/$PIP_REQ_FILE /ums-agenten/requirements.txt
RUN pip3 install --break-system-packages --no-cache-dir -r /ums-agenten/requirements.txt \
&& python -m pip freeze > /ums-agenten/requirements.txt
COPY ./docker/init.py /ums-agenten/project/
COPY ./docker/setup.py /ums-agenten/project/
RUN pip3 install --break-system-packages -e /ums-agenten/project/
WORKDIR /ums-agenten/project/src/
RUN chown -R user:user /ums-agenten
USER user
CMD ["/bin/bash"]