move all code to root

This commit is contained in:
SvenBrnn
2025-05-22 05:24:15 +00:00
parent b44de8fd6b
commit 2a9f1a4882
8 changed files with 2 additions and 2 deletions
+45
View File
@@ -0,0 +1,45 @@
ARG OLLAMA_VERSION=0.5.7
# Use an official base${OLLAMA_VERSION} image with your desired version
FROM ollama/ollama:${OLLAMA_VERSION}
ENV PYTHONUNBUFFERED=1
# Set up the working directory
WORKDIR /
RUN apt-get update --yes --quiet && DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
software-properties-common \
gpg-agent \
build-essential apt-utils \
&& apt-get install --reinstall ca-certificates \
&& add-apt-repository --yes ppa:deadsnakes/ppa && apt update --yes --quiet \
&& DEBIAN_FRONTEND=noninteractive apt-get install --yes --quiet --no-install-recommends \
python3.11 \
python3.11-dev \
python3.11-distutils \
python3.11-lib2to3 \
python3.11-gdbm \
python3.11-tk \
curl \
pip && \
ln -s /usr/bin/python3 /usr/bin/python && \
pip install --upgrade pip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /work
# Add my src as /work
ADD engine.py handler.py requirements.txt start.sh test_input.json utils.py utils.py /work
# Set defaut ollama models directory to /runpod-volume where runpod will mount the volume by default
ENV OLLAMA_MODELS="/runpod-volume"
# Install runpod and its dependencies
RUN pip install -r requirements.txt && \
chmod +x start.sh
# Set the entrypoint
ENTRYPOINT ["/bin/sh", "-c", "/work/start.sh"]