Added ai-tools image option

This commit is contained in:
2026-04-24 17:45:17 -05:00
parent cca4229a8c
commit 11581501e6
11 changed files with 288 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
# 1. A: Define a base image
FROM itdominator-base
# 1. B: Set ENV Variables
ENV NVM_VERSION=0.40.3
ENV NODE_VERSION=24.9.0
ENV PYTHON_VERSION=3.12.12
ENV PYTHON_SUB_VERSION=3.12
ENV NVM_DIR="/root/.nvm"
ENV PYENV_ROOT="/opt/pyenv"
ENV PATH="${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}"
ENV PATH="${PYENV_ROOT}/bin:${PYENV_ROOT}/shims:${PATH}"
ENV PATH="/opt:${PATH}"
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# 2. Set the working directory inside the container
WORKDIR /home/abaddon/
# 3. A: Install dependencies
RUN apt-get update
RUN apt-get install -y \
--no-install-recommends \
--no-install-suggests \
tree
RUN curl -fsSL https://pyenv.run | bash
RUN pyenv install ${PYTHON_VERSION} && pyenv global ${PYTHON_VERSION} && pyenv local ${PYTHON_VERSION}
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v"${NVM_VERSION}"/install.sh | bash
RUN . "${NVM_DIR}/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "${NVM_DIR}/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "${NVM_DIR}/nvm.sh" && nvm alias default v${NODE_VERSION}
RUN node --version
RUN npm --version
# 4. Copy the requirements and src files
COPY Docker/opt/ /opt/
COPY Docker/scripts/run.sh .
RUN chmod +x /home/abaddon/run.sh
RUN chown abaddon:abaddon -R /home/abaddon
USER abaddon
RUN ollama serve & sleep 5 && ollama pull llama3.1:8b
USER root
# 5. Cleanup
RUN apt-get autoremove --purge
RUN apt-get autoclean
RUN rm -rf /var/lib/apt/lists/*
RUN rm -rf /tmp/*
RUN mkdir -p /tmp/apps
# 6. Expose Port and define the command used to run the app
EXPOSE 80
EXPOSE 443
CMD ["/home/abaddon/run.sh"]