From 338cf2e433f2aa2d8bf221f6ff5f194ed0cf24b2 Mon Sep 17 00:00:00 2001 From: sebDtSci Date: Thu, 29 Aug 2024 14:43:35 +0200 Subject: [PATCH] docker modification --- = | 0 Dockerfile | 11 ++++++----- docker-compose.yml | 2 +- main.py | 2 +- naming | 0 requirements.txt | 6 +++--- 6 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 = create mode 100644 naming diff --git a/= b/= new file mode 100644 index 0000000..e69de29 diff --git a/Dockerfile b/Dockerfile index fbf1aa6..1cba351 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ curl \ ca-certificates \ openssh-server \ - libnvidia-compute-460 \ + # libnvidia-compute-460 \ + libsqlite3-dev \ && ln -s /usr/bin/python3 /usr/bin/python \ && rm -rf /var/lib/apt/lists/* @@ -23,11 +24,11 @@ RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/ # SSH login fix. Otherwise user is kicked off after login RUN sed -i 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd -WORKDIR /app +# WORKDIR /app -COPY . app/ -# RUN pip install --no-cache-dir -r app/requirements.txt +COPY . . +RUN pip install --no-cache-dir -r requirements.txt -EXPOSE 5000 +EXPOSE 8501 CMD ["python3", "main.py"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 3c6b5cf..4238e6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: context: . dockerfile: Dockerfile ports: - - "5000:5000" + - "8501:8501" deploy: replicas: 1 environment: diff --git a/main.py b/main.py index b29f0ce..51e842b 100644 --- a/main.py +++ b/main.py @@ -9,7 +9,7 @@ def run_app(): subprocess.run(["streamlit", "run", "src/streamapp.py"]) if __name__ == "__main__": - subprocess.run(["python3", "-m", "pip", "install", "--no-cache-dir", "-r", "requirements.txt"]) + # subprocess.run(["python3", "-m", "pip", "install", "--no-cache-dir", "-r", "requirements.txt"], check=True) db_thread = threading.Thread(target=init_db) streamlit_thread = threading.Thread(target=run_app) db_thread.start() diff --git a/naming b/naming new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt index 3d0186a..de6f150 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ ollama==0.3.2 transformers==4.44.2 streamlit==1.38.0 -pandas==2.2.2 -tf-keras==2.17.0 +pandas +tf-keras==2.14.1 chromadb==0.5.5 torch==2.4.0 python-docx==1.1.2 PyMuPDF==1.24.9 watchdog==4.0.2 -scikit-learn==1.5.1 +scikit-learn==1.3.2 shortterm_memory==1.0.4 \ No newline at end of file