Merge pull request #7 from jammsen/patch-1

Updated to a more clean apt usage
This commit is contained in:
Saifeddine ALOUI 2024-03-28 12:39:37 +01:00 committed by GitHub
commit ac350488c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 7 deletions

View File

@ -1,20 +1,25 @@
FROM python:3.11 FROM python:3.11
# install necessary tools into the base image and download git repository # Update packagtes, install necessary tools into the base image, clean up and clone git repository
RUN apt update && apt install -y git apache2 && git clone https://github.com/ParisNeo/ollama_proxy_server.git RUN apt update \
&& apt install -y --no-install-recommends --no-install-suggests git apache2 \
&& apt autoremove -y --purge \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& git clone https://github.com/ParisNeo/ollama_proxy_server.git
# change working directory to cloned git repository # Change working directory to cloned git repository
WORKDIR ollama_proxy_server WORKDIR ollama_proxy_server
# install all requirements # Install all needed requirements
RUN pip3 install -e . RUN pip3 install -e .
# copy config.ini and authorized_users.txt into project working directory # Copy config.ini and authorized_users.txt into project working directory
COPY config.ini . COPY config.ini .
COPY authorized_users.txt . COPY authorized_users.txt .
# start the proxy server as entrypoint # Start the proxy server as entrypoint
ENTRYPOINT ["ollama_proxy_server"] ENTRYPOINT ["ollama_proxy_server"]
# set command line parameters # Set command line parameters
CMD ["--config", "./config.ini", "--users_list", "./authorized_users.txt", "--port", "8080"] CMD ["--config", "./config.ini", "--users_list", "./authorized_users.txt", "--port", "8080"]