ollama_proxy_server/Dockerfile

26 lines
852 B
Docker
Raw Normal View History

2024-01-30 19:25:38 +08:00
FROM python:3.11
2024-03-25 04:37:37 +08:00
# Update packagtes, install necessary tools into the base image, clean up and clone git repository
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
2024-01-30 19:25:38 +08:00
2024-03-25 04:37:37 +08:00
# Change working directory to cloned git repository
2024-01-30 19:25:38 +08:00
WORKDIR ollama_proxy_server
2024-03-25 04:37:37 +08:00
# Install all needed requirements
2024-01-30 19:25:38 +08:00
RUN pip3 install -e .
2024-03-25 04:37:37 +08:00
# Copy config.ini and authorized_users.txt into project working directory
2024-01-30 19:25:38 +08:00
COPY config.ini .
COPY authorized_users.txt .
2024-03-25 04:37:37 +08:00
# Start the proxy server as entrypoint
2024-01-30 19:25:38 +08:00
ENTRYPOINT ["ollama_proxy_server"]
2024-03-25 04:37:37 +08:00
# Set command line parameters
2024-01-30 19:25:38 +08:00
CMD ["--config", "./config.ini", "--users_list", "./authorized_users.txt", "--port", "8080"]