diff --git a/.history/.streamlit/config_20240310222951.toml b/.history/.streamlit/config_20240310222951.toml deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.history/.streamlit/config_20240310223008.toml b/.history/.streamlit/config_20240310223008.toml deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.history/Dockerfile_20240310012154 b/.history/Dockerfile_20240310012154 deleted file mode 100644 index edd80b1a5f798aa4426bb097e2422357a494aff0..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310012154 +++ /dev/null @@ -1,22 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Set the working directory in the container -WORKDIR /usr/src/app - -# Copy the current directory contents into the container at /usr/src/app -COPY requirements.txt ./ -COPY app.py ./ -COPY src ./src - -# Install any needed packages specified in requirements.txt -RUN pip install --no-cache-dir -r requirements.txt - -# Make port 8501 available to the world outside this container -EXPOSE 8501 - -# Define environment variable -ENV NAME Chat-w-git - -# Run app.py when the container launches -CMD ["streamlit", "run", "app.py"] diff --git a/.history/Dockerfile_20240310012228 b/.history/Dockerfile_20240310012228 deleted file mode 100644 index 1440cb0e175b6e1d915b3a830146ab9ace37ef3a..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310012228 +++ /dev/null @@ -1,19 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Set the working directory in the container -WORKDIR /usr/src/app - -# Copy the current directory contents into the container at /usr/src/app -COPY requirements.txt ./ -COPY app.py ./ -COPY src ./src - -# Install any needed packages specified in requirements.txt -RUN pip install --no-cache-dir -r requirements.txt - -# Make port 8501 available to the world outside this container -EXPOSE 8501 - -# Run app.py when the container launches -CMD ["streamlit", "run", "app.py"] diff --git a/.history/Dockerfile_20240310014704 b/.history/Dockerfile_20240310014704 deleted file mode 100644 index 8dcaea07362dee7908e596ef7018b4dae4544eda..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310014704 +++ /dev/null @@ -1,37 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create app directory -WORKDIR /app - -# Copy the Python requirements file and system packages list -COPY ./requirements.txt /app/requirements.txt - -# Install system dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Install Python dependencies -RUN pip install --upgrade pip setuptools wheel && \ - pip install --no-cache-dir -r /app/requirements.txt - -# Create a non-root user -RUN useradd -m -u 1000 user -USER user -ENV HOME /home/user -ENV PATH $HOME/.local/bin:$PATH - -# Copy the application to the user's home directory -WORKDIR $HOME -COPY --chown=user:user . $HOME/app - -# Set the working directory to the app directory -WORKDIR $HOME/app - -# Expose the Streamlit port -EXPOSE 8501 - -# Run the Streamlit application with additional configurations for cloud deployment -CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.headless=true", "--server.enableCORS=false", "--server.enableXsrfProtection=false", "--server.fileWatcherType=none"] diff --git a/.history/Dockerfile_20240310014908 b/.history/Dockerfile_20240310014908 deleted file mode 100644 index 544eb91cc9084547ac5ad2f7623321a91d7bbad4..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310014908 +++ /dev/null @@ -1,44 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Set a working directory for the application -WORKDIR /app - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -# If you have system dependencies listed in a packages.txt file, uncomment the next line -# COPY ./packages.txt /app/packages.txt - -# Install system dependencies -# If you're using packages.txt, uncomment the following RUN command and remove the subsequent one -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Create a non-root user and switch to it -RUN useradd -m user -USER user -ENV HOME /home/user -ENV PATH $HOME/.local/bin:$PATH - -# Copy the application source code to the container (as the non-root user) -COPY --chown=user:user . $HOME/app - -# Set the working directory to the app directory -WORKDIR $HOME/app - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py \ - --server.headless true \ - --server.address 0.0.0.0 \ - --server.enableCORS false \ - --server.enableXsrfProtection false \ - --server.fileWatcherType none diff --git a/.history/Dockerfile_20240310014955 b/.history/Dockerfile_20240310014955 deleted file mode 100644 index 8e28239a1eac573b2d7b10966bb5547c09392b6d..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310014955 +++ /dev/null @@ -1,48 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Set a working directory for the application -WORKDIR /app - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src /app/src - - -# If you have system dependencies listed in a packages.txt file, uncomment the next line -# COPY ./packages.txt /app/packages.txt - -# Install system dependencies -# If you're using packages.txt, uncomment the following RUN command and remove the subsequent one -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Create a non-root user and switch to it -RUN useradd -m user -USER user -ENV HOME /home/user -ENV PATH $HOME/.local/bin:$PATH - -# Copy the application source code to the container (as the non-root user) -COPY --chown=user:user . $HOME/app - -# Set the working directory to the app directory -WORKDIR $HOME/app - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py \ - --server.headless true \ - --server.address 0.0.0.0 \ - --server.enableCORS false \ - --server.enableXsrfProtection false \ - --server.fileWatcherType none diff --git a/.history/Dockerfile_20240310015011 b/.history/Dockerfile_20240310015011 deleted file mode 100644 index 503ccb1573e1477127fe3ceefe095fc9d2893ce0..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310015011 +++ /dev/null @@ -1,42 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Set a working directory for the application -WORKDIR /app - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src /app/src - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Create a non-root user and switch to it -RUN useradd -m user -USER user -ENV HOME /home/user -ENV PATH $HOME/.local/bin:$PATH - -# Copy the application source code to the container (as the non-root user) -COPY --chown=user:user . $HOME/app - -# Set the working directory to the app directory -WORKDIR $HOME/app - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py \ - --server.headless true \ - --server.address 0.0.0.0 \ - --server.enableCORS false \ - --server.enableXsrfProtection false \ - --server.fileWatcherType none diff --git a/.history/Dockerfile_20240310015012 b/.history/Dockerfile_20240310015012 deleted file mode 100644 index 503ccb1573e1477127fe3ceefe095fc9d2893ce0..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310015012 +++ /dev/null @@ -1,42 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Set a working directory for the application -WORKDIR /app - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src /app/src - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Create a non-root user and switch to it -RUN useradd -m user -USER user -ENV HOME /home/user -ENV PATH $HOME/.local/bin:$PATH - -# Copy the application source code to the container (as the non-root user) -COPY --chown=user:user . $HOME/app - -# Set the working directory to the app directory -WORKDIR $HOME/app - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py \ - --server.headless true \ - --server.address 0.0.0.0 \ - --server.enableCORS false \ - --server.enableXsrfProtection false \ - --server.fileWatcherType none diff --git a/.history/Dockerfile_20240310015021 b/.history/Dockerfile_20240310015021 deleted file mode 100644 index 503ccb1573e1477127fe3ceefe095fc9d2893ce0..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310015021 +++ /dev/null @@ -1,42 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Set a working directory for the application -WORKDIR /app - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src /app/src - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Create a non-root user and switch to it -RUN useradd -m user -USER user -ENV HOME /home/user -ENV PATH $HOME/.local/bin:$PATH - -# Copy the application source code to the container (as the non-root user) -COPY --chown=user:user . $HOME/app - -# Set the working directory to the app directory -WORKDIR $HOME/app - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py \ - --server.headless true \ - --server.address 0.0.0.0 \ - --server.enableCORS false \ - --server.enableXsrfProtection false \ - --server.fileWatcherType none diff --git a/.history/Dockerfile_20240310121246 b/.history/Dockerfile_20240310121246 deleted file mode 100644 index 9a2ba3bb7f2e885d0a48cc947c671425de2590e6..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310121246 +++ /dev/null @@ -1,19 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR /app - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src /app/src - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py diff --git a/.history/Dockerfile_20240310121443 b/.history/Dockerfile_20240310121443 deleted file mode 100644 index 51ce5aa69661125b8ae875a057b492ff2ca3b965..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310121443 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR /app - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src /app/src - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py \ No newline at end of file diff --git a/.history/Dockerfile_20240310121634 b/.history/Dockerfile_20240310121634 deleted file mode 100644 index f21e3a3505fc1eb097cf6988160e408aa40f9da6..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310121634 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR /app - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src /app/src - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run /app/app.py \ No newline at end of file diff --git a/.history/Dockerfile_20240310121931 b/.history/Dockerfile_20240310121931 deleted file mode 100644 index 58b49f17ccf45f51693cb910ebec874c17907c0a..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310121931 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR /app - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src/ /app/src/ - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run /app/app.py --server.address 0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310121948 b/.history/Dockerfile_20240310121948 deleted file mode 100644 index 58b49f17ccf45f51693cb910ebec874c17907c0a..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310121948 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR /app - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src/ /app/src/ - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run /app/app.py --server.address 0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310122013 b/.history/Dockerfile_20240310122013 deleted file mode 100644 index 46b9b32fa697ec26a229e9d875898d11eb762321..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310122013 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR / - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /requirements.txt -COPY ./app.py /app.py -COPY ./src/ /src/ - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run /app/app.py --server.address 0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310122017 b/.history/Dockerfile_20240310122017 deleted file mode 100644 index 090930f0128e6038c01d08913d9a82eec5503393..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310122017 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR / - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /requirements.txt -COPY ./app.py /app.py -COPY ./src/ /src/ - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run /app.py --server.address 0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310122018 b/.history/Dockerfile_20240310122018 deleted file mode 100644 index 090930f0128e6038c01d08913d9a82eec5503393..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310122018 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR / - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /requirements.txt -COPY ./app.py /app.py -COPY ./src/ /src/ - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run /app.py --server.address 0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310122020 b/.history/Dockerfile_20240310122020 deleted file mode 100644 index 6887c11a6685426c16c8f9bafc8008a96e4c6ac9..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310122020 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR / - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /requirements.txt -COPY ./app.py /app.py -COPY ./src/ /src/ - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address 0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310122058 b/.history/Dockerfile_20240310122058 deleted file mode 100644 index 1ea749d98fba907c26639b874e86688f0d03d7e4..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310122058 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR / - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /requirements.txt -COPY ./app.py /app.py -COPY ./src/ /src/ - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address 0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310122106 b/.history/Dockerfile_20240310122106 deleted file mode 100644 index 1ea749d98fba907c26639b874e86688f0d03d7e4..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310122106 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR / - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /requirements.txt -COPY ./app.py /app.py -COPY ./src/ /src/ - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address 0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310122300 b/.history/Dockerfile_20240310122300 deleted file mode 100644 index 2555cc5d47bf44c0bd5db36a5491006d5b6adef9..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310122300 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR / - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src/ /app/src/ - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address 0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310122456 b/.history/Dockerfile_20240310122456 deleted file mode 100644 index 9205c5ac7d688701f1f961d75173b3eae4276b1c..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310122456 +++ /dev/null @@ -1,25 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Set a working directory for the application -WORKDIR / - -# Copy the Python and system requirements files to the container -COPY ./requirements.txt /app/requirements.txt -COPY ./app.py /app/app.py -COPY ./src/ /app/src/ - -# RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* -RUN apt-get update && apt-get install -y \ - build-essential \ - libgomp1 \ - && rm -rf /var/lib/apt/lists/* - -# Upgrade pip, setuptools, and wheel, then install Python dependencies -RUN pip install --upgrade pip setuptools wheel && pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run /app/app.py --server.address 0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310122851 b/.history/Dockerfile_20240310122851 deleted file mode 100644 index 2e64139ddbecf7ac9f99ad748281791225e79d65..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310122851 +++ /dev/null @@ -1,47 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.11-slim - -# Set a working directory for copying requirements initially -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./requirements.txt /app/requirements.txt - -# Install Python dependencies -RUN pip install --no-cache-dir -r /app/requirements.txt - -# Copy specific application files to the container -COPY ./app.py /app/app.py -COPY ./src /app/src - -# Create a non-root user 'appuser' with home directory /home/appuser -# No need to specify USER ID unless it's required for your use case -RUN useradd -m appuser - -# Switch to the non-root user -USER appuser - -# Set environment variables for the non-root user -ENV HOME /home/appuser -ENV PATH $HOME/.local/bin:$PATH - -# Set the working directory to the non-root user's home directory -WORKDIR $HOME - -# Create an 'app' directory under the non-root user's home directory and change workdir to it -RUN mkdir app -WORKDIR $HOME/app - -# Copy the application files from host to container, ensuring correct ownership -COPY --chown=appuser:appuser . $HOME/app - -# Since we've already copied app.py and src/ before changing the user, -# ensure they are copied into the correct final directory and with correct ownership -COPY --chown=appuser:appuser /app/app.py $HOME/app/ -COPY --chown=appuser:appuser /app/src/ $HOME/app/src/ - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310123010 b/.history/Dockerfile_20240310123010 deleted file mode 100644 index 8ece62aa5f8aa0983f43579fa17ee9cfef8dd739..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310123010 +++ /dev/null @@ -1,36 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.11-slim - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./requirements.txt /app/requirements.txt - -# Install Python dependencies -RUN pip install --no-cache-dir -r /app/requirements.txt - -# Switch to the non-root user -USER appuser - -# Set environment variables for the non-root user -ENV HOME /home/appuser - -# Set the working directory to the non-root user's home directory -WORKDIR $HOME - -# Create an 'app' directory under the non-root user's home directory and change workdir to it -RUN mkdir app -WORKDIR $HOME/app - -# Copy the application files from host to container, ensuring correct ownership -COPY --chown=appuser:appuser ./ $HOME/app/ - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0"] diff --git a/.history/Dockerfile_20240310123131 b/.history/Dockerfile_20240310123131 deleted file mode 100644 index c934acfc0e45409e657b0956e521ca6aa3712231..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310123131 +++ /dev/null @@ -1,36 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.11-slim - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app/ - -# Install Python dependencies -RUN pip install --no-cache-dir -r /app/requirements.txt - -# Switch to the non-root user -USER appuser - -# Set environment variables for the non-root user -ENV HOME /home/appuser - -# Set the working directory to the non-root user's home directory -WORKDIR $HOME - -# Create an 'app' directory under the non-root user's home directory and change workdir to it -RUN mkdir app -WORKDIR $HOME/app - -# Copy the application files from host to container, ensuring correct ownership -COPY --chown=appuser:appuser ./ $HOME/app/ - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0"] diff --git a/.history/Dockerfile_20240310123224 b/.history/Dockerfile_20240310123224 deleted file mode 100644 index 7f0241b99176034e782e94622c933a1ce88e9fd7..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310123224 +++ /dev/null @@ -1,36 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9-slim - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app/ - -# Install Python dependencies -RUN pip install --no-cache-dir -r /app/requirements.txt - -# Switch to the non-root user -USER appuser - -# Set environment variables for the non-root user -ENV HOME /home/appuser - -# Set the working directory to the non-root user's home directory -WORKDIR $HOME - -# Create an 'app' directory under the non-root user's home directory and change workdir to it -RUN mkdir app -WORKDIR $HOME/app - -# Copy the application files from host to container, ensuring correct ownership -COPY --chown=appuser:appuser ./ $HOME/app/ - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0"] diff --git a/.history/Dockerfile_20240310123319 b/.history/Dockerfile_20240310123319 deleted file mode 100644 index df0b3c154248f0610b7402ce362a66745f162085..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310123319 +++ /dev/null @@ -1,36 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app/ - -# Install Python dependencies -RUN pip install --no-cache-dir -r /app/requirements.txt - -# Switch to the non-root user -USER appuser - -# Set environment variables for the non-root user -ENV HOME /home/appuser - -# Set the working directory to the non-root user's home directory -WORKDIR $HOME - -# Create an 'app' directory under the non-root user's home directory and change workdir to it -RUN mkdir app -WORKDIR $HOME/app - -# Copy the application files from host to container, ensuring correct ownership -COPY --chown=appuser:appuser ./ $HOME/app/ - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0"] diff --git a/.history/Dockerfile_20240310123825 b/.history/Dockerfile_20240310123825 deleted file mode 100644 index a6053000450c65542c8fd6b2e7180eb7b48ec5e7..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310123825 +++ /dev/null @@ -1,36 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app/ - -# Install Python dependencies -RUN pip install --no-cache-dir -r /app/requirements.txt - -# # Switch to the non-root user -# USER appuser - -# # Set environment variables for the non-root user -# ENV HOME /home/appuser - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home directory and change workdir to it -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the application files from host to container, ensuring correct ownership -# COPY --chown=appuser:appuser ./ $HOME/app/ - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0"] diff --git a/.history/Dockerfile_20240310123836 b/.history/Dockerfile_20240310123836 deleted file mode 100644 index e4a740cd969cd3be9d02143b0d6e6136991db8e3..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310123836 +++ /dev/null @@ -1,36 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app/ - -# Install Python dependencies -RUN pip install --no-cache-dir -r /app/requirements.txt - -# # Switch to the non-root user -# USER appuser - -# # Set environment variables for the non-root user -# ENV HOME /home/appuser - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home directory and change workdir to it -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the application files from host to container, ensuring correct ownership -# COPY --chown=appuser:appuser ./ $HOME/app/ - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD ["streamlit", "run", "app.py"] diff --git a/.history/Dockerfile_20240310124558 b/.history/Dockerfile_20240310124558 deleted file mode 100644 index 8d6891c7f909b1d1871a1dda501756ca3ea7f18a..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310124558 +++ /dev/null @@ -1,36 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app/ - -# Install Python dependencies -RUN pip install --no-cache-dir -r /app/requirements.txt - -# # Switch to the non-root user -# USER appuser - -# # Set environment variables for the non-root user -# ENV HOME /home/appuser - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home directory and change workdir to it -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the application files from host to container, ensuring correct ownership -# COPY --chown=appuser:appuser ./ $HOME/app/ - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=8501"] diff --git a/.history/Dockerfile_20240310124839 b/.history/Dockerfile_20240310124839 deleted file mode 100644 index 69559828d2efbc935b0bb25c86371e1955bb6505..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310124839 +++ /dev/null @@ -1,20 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=8501"] diff --git a/.history/Dockerfile_20240310125002 b/.history/Dockerfile_20240310125002 deleted file mode 100644 index ccfc72f57bacb8e746fe750285566124670859df..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310125002 +++ /dev/null @@ -1,20 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py \ No newline at end of file diff --git a/.history/Dockerfile_20240310125005 b/.history/Dockerfile_20240310125005 deleted file mode 100644 index 029e760b0ebfbb1633c4bf5ab2b8a02bb09ee9f7..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310125005 +++ /dev/null @@ -1,20 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py \ No newline at end of file diff --git a/.history/Dockerfile_20240310125425 b/.history/Dockerfile_20240310125425 deleted file mode 100644 index b8fe6d9fcfd34c548bd8e3814751e22c14bc9c14..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310125425 +++ /dev/null @@ -1,20 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD python streamlit run app.py --server.address=0.0.0.0 diff --git a/.history/Dockerfile_20240310125557 b/.history/Dockerfile_20240310125557 deleted file mode 100644 index cc0e16dbb894426eec04d3ea702bae59bed63a6d..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310125557 +++ /dev/null @@ -1,20 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address=0.0.0.0 diff --git a/.history/Dockerfile_20240310125612 b/.history/Dockerfile_20240310125612 deleted file mode 100644 index cc0e16dbb894426eec04d3ea702bae59bed63a6d..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310125612 +++ /dev/null @@ -1,20 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r /app/requirements.txt - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address=0.0.0.0 diff --git a/.history/Dockerfile_20240310130057 b/.history/Dockerfile_20240310130057 deleted file mode 100644 index 608109a1d7e011155d04d8db1541cfd0ea42486c..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310130057 +++ /dev/null @@ -1,23 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r /app/requirements.txt -RUN pip install "langchain[docarray]" -RUN pip3 install "langchain[docarray]" - - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address=0.0.0.0 diff --git a/.history/Dockerfile_20240310130108 b/.history/Dockerfile_20240310130108 deleted file mode 100644 index e87916b8c98ee219b79ee02f25b0723c559e4278..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310130108 +++ /dev/null @@ -1,23 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r /app/requirements.txt -RUN pip install "langchain[docarray]" -RUN pip3 install "langchain[docarray]" - - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address=0.0.0.0:8501 diff --git a/.history/Dockerfile_20240310130420 b/.history/Dockerfile_20240310130420 deleted file mode 100644 index 608109a1d7e011155d04d8db1541cfd0ea42486c..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310130420 +++ /dev/null @@ -1,23 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r /app/requirements.txt -RUN pip install "langchain[docarray]" -RUN pip3 install "langchain[docarray]" - - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address=0.0.0.0 diff --git a/.history/Dockerfile_20240310130429 b/.history/Dockerfile_20240310130429 deleted file mode 100644 index 46661c2343c0038c160a531706d7387877c996c3..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310130429 +++ /dev/null @@ -1,22 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r /app/requirements.txt -RUN pip install "langchain[docarray]" -RUN pip3 install "langchain[docarray]" - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address=0.0.0.0 diff --git a/.history/Dockerfile_20240310203811 b/.history/Dockerfile_20240310203811 deleted file mode 100644 index 8b1b28c9fe63c06807b0d6bf769fcd489c6823f6..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310203811 +++ /dev/null @@ -1,22 +0,0 @@ -# Use an official Python runtime as a parent image -FROM python:3.9 - -# Create a non-root user 'appuser' with home directory /home/appuser -RUN useradd -m appuser - -# Set a working directory for copying requirements initially as root -WORKDIR /app - -# Copy only the requirements file, to cache the pip install step -COPY ./ /app - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r /app/requirements.txt -RUN pip install "langchain[docarray]" -RUN pip3 install "langchain[docarray]" - -# Expose the port the app runs on -EXPOSE 8501 - -# Define the command to run the app -CMD streamlit run app.py --server.address=0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310204031 b/.history/Dockerfile_20240310204031 deleted file mode 100644 index 011aa98393f60d32301fc317c14fd0a51af88f6c..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310204031 +++ /dev/null @@ -1,44 +0,0 @@ -# # Use an official Python runtime as a parent image -# FROM python:3.9 - -# # Create a non-root user 'appuser' with home directory /home/appuser -# RUN useradd -m appuser - -# # Set a working directory for copying requirements initially as root -# WORKDIR /app - -# # Copy only the requirements file, to cache the pip install step -# COPY ./ /app - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r /app/requirements.txt -# RUN pip install "langchain[docarray]" -# RUN pip3 install "langchain[docarray]" - -# # Expose the port the app runs on -# EXPOSE 8501 - -# # Define the command to run the app -# CMD streamlit run app.py --server.address=0.0.0.0 - - -FROM python:3.9-slim - -WORKDIR /app - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -COPY ./ /app - -RUN pip3 install -r requirements.txt - -EXPOSE 8501 - -HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310204542 b/.history/Dockerfile_20240310204542 deleted file mode 100644 index 0640d7021d402173d27ce2268f2f4f694415e3d6..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310204542 +++ /dev/null @@ -1,45 +0,0 @@ -# # Use an official Python runtime as a parent image -# FROM python:3.9 - -# # Create a non-root user 'appuser' with home directory /home/appuser -# RUN useradd -m appuser - -# # Set a working directory for copying requirements initially as root -# WORKDIR /app - -# # Copy only the requirements file, to cache the pip install step -# COPY ./ /app - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r /app/requirements.txt -# RUN pip install "langchain[docarray]" -# RUN pip3 install "langchain[docarray]" - -# # Expose the port the app runs on -# EXPOSE 8501 - -# # Define the command to run the app -# CMD streamlit run app.py --server.address=0.0.0.0 - - -FROM python:3.9-slim - -WORKDIR /app - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -COPY ./ /app - -RUN pip3 install -r requirements.txt -RUN pip3 install 'langchain[docarray]' - -EXPOSE 8501 - -HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310210059 b/.history/Dockerfile_20240310210059 deleted file mode 100644 index 8623afe3db9a272990ad603d7aa6b93d5de806bb..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310210059 +++ /dev/null @@ -1,91 +0,0 @@ -# # Use an official Python runtime as a parent image -# FROM python:3.9 - -# # Create a non-root user 'appuser' with home directory /home/appuser -# RUN useradd -m appuser - -# # Set a working directory for copying requirements initially as root -# WORKDIR /app - -# # Copy only the requirements file, to cache the pip install step -# COPY ./ /app - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r /app/requirements.txt -# RUN pip install "langchain[docarray]" -# RUN pip3 install "langchain[docarray]" - -# # Expose the port the app runs on -# EXPOSE 8501 - -# # Define the command to run the app -# CMD streamlit run app.py --server.address=0.0.0.0 - - -# FROM python:3.8.9 - -# WORKDIR /app - -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# COPY ./ /app - -# RUN pip3 install -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# EXPOSE 8501 - -# HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# Use Python 3.8.9 as the base image -FROM python:3.8.9 - -# Set the working directory in the container -WORKDIR /app - -# Install system dependencies -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# Copy the requirements and packages files into the container -COPY ./requirements.txt ./packages.txt /app/ - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r requirements.txt -RUN pip3 install 'langchain[docarray]' - -# Create a non-root user to run the application -RUN useradd -m -u 1000 user -USER user - -# Set environment variables for the non-root user -ENV HOME /home/user -ENV PATH $HOME/.local/bin:$PATH - -# Set the working directory to the non-root user's home directory -WORKDIR $HOME - -# Create an 'app' directory under the non-root user's home and set it as the working directory -RUN mkdir app -WORKDIR $HOME/app - -# Copy the rest of the application's code with appropriate ownership -COPY --chown=user:user . $HOME/app - -# Expose the port Streamlit runs on -EXPOSE 8501 - -# Set the entry point and default command to run the Streamlit application -ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310210143 b/.history/Dockerfile_20240310210143 deleted file mode 100644 index f2e4c8b7ebc7e010e8482c7db355d6f051d99d74..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310210143 +++ /dev/null @@ -1,91 +0,0 @@ -# # Use an official Python runtime as a parent image -# FROM python:3.9 - -# # Create a non-root user 'appuser' with home directory /home/appuser -# RUN useradd -m appuser - -# # Set a working directory for copying requirements initially as root -# WORKDIR /app - -# # Copy only the requirements file, to cache the pip install step -# COPY ./ /app - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r /app/requirements.txt -# RUN pip install "langchain[docarray]" -# RUN pip3 install "langchain[docarray]" - -# # Expose the port the app runs on -# EXPOSE 8501 - -# # Define the command to run the app -# CMD streamlit run app.py --server.address=0.0.0.0 - - -# FROM python:3.8.9 - -# WORKDIR /app - -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# COPY ./ /app - -# RUN pip3 install -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# EXPOSE 8501 - -# HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# Use Python 3.8.9 as the base image -FROM python:3.8.9 - -# Set the working directory in the container -WORKDIR /app - -# Install system dependencies -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# Copy the requirements and packages files into the container -COPY ./requirements.txt /app/ - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r requirements.txt -RUN pip3 install 'langchain[docarray]' - -# Create a non-root user to run the application -RUN useradd -m -u 1000 user -USER user - -# Set environment variables for the non-root user -ENV HOME /home/user -ENV PATH $HOME/.local/bin:$PATH - -# Set the working directory to the non-root user's home directory -WORKDIR $HOME - -# Create an 'app' directory under the non-root user's home and set it as the working directory -RUN mkdir app -WORKDIR $HOME/app - -# Copy the rest of the application's code with appropriate ownership -COPY --chown=user:user . $HOME/app - -# Expose the port Streamlit runs on -EXPOSE 8501 - -# Set the entry point and default command to run the Streamlit application -ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310210457 b/.history/Dockerfile_20240310210457 deleted file mode 100644 index 347da3d25ff7a91ab9476e42227a5855ca684ac3..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310210457 +++ /dev/null @@ -1,92 +0,0 @@ -# # Use an official Python runtime as a parent image -# FROM python:3.9 - -# # Create a non-root user 'appuser' with home directory /home/appuser -# RUN useradd -m appuser - -# # Set a working directory for copying requirements initially as root -# WORKDIR /app - -# # Copy only the requirements file, to cache the pip install step -# COPY ./ /app - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r /app/requirements.txt -# RUN pip install "langchain[docarray]" -# RUN pip3 install "langchain[docarray]" - -# # Expose the port the app runs on -# EXPOSE 8501 - -# # Define the command to run the app -# CMD streamlit run app.py --server.address=0.0.0.0 - - -# FROM python:3.8.9 - -# WORKDIR /app - -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# COPY ./ /app - -# RUN pip3 install -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# EXPOSE 8501 - -# HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# Use Python 3.8.9 as the base image -FROM python:3.8.9 - -# Set the working directory in the container -WORKDIR /app - -# Install system dependencies -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# Copy the requirements and packages files into the container -COPY ./requirements.txt /app/ - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r requirements.txt -RUN pip3 install 'langchain[docarray]' - -# Create a non-root user to run the application -RUN useradd -m -u 1000 user -USER user - -# Set environment variables for the non-root user -ENV HOME /home/user -ENV PATH $HOME/.local/bin:$PATH - -# Set the working directory to the non-root user's home directory -WORKDIR $HOME - -# Create an 'app' directory under the non-root user's home and set it as the working directory -RUN mkdir app -WORKDIR $HOME/app - -# Copy the rest of the application's code with appropriate ownership -COPY --chown=user:user . $HOME/app - -# Expose the port Streamlit runs on -EXPOSE 8501 -ENV PORT=8501 - -# Set the entry point and default command to run the Streamlit application -ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310210618 b/.history/Dockerfile_20240310210618 deleted file mode 100644 index e04035905d8f352f9a7500cd1865a63ef498e714..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310210618 +++ /dev/null @@ -1,93 +0,0 @@ -# # Use an official Python runtime as a parent image -# FROM python:3.9 - -# # Create a non-root user 'appuser' with home directory /home/appuser -# RUN useradd -m appuser - -# # Set a working directory for copying requirements initially as root -# WORKDIR /app - -# # Copy only the requirements file, to cache the pip install step -# COPY ./ /app - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r /app/requirements.txt -# RUN pip install "langchain[docarray]" -# RUN pip3 install "langchain[docarray]" - -# # Expose the port the app runs on -# EXPOSE 8501 - -# # Define the command to run the app -# CMD streamlit run app.py --server.address=0.0.0.0 - - -# FROM python:3.8.9 - -# WORKDIR /app - -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# COPY ./ /app - -# RUN pip3 install -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# EXPOSE 8501 - -# HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# Use Python 3.8.9 as the base image -FROM python:3.8.9 - -# Set the working directory in the container -WORKDIR /app - -# Install system dependencies -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# Copy the requirements and packages files into the container -COPY ./requirements.txt /app/ - -# Install Python dependencies -RUN pip3 install --no-cache-dir -r requirements.txt -RUN pip3 install 'langchain[docarray]' - -# Create a non-root user to run the application -RUN useradd -m -u 1000 user -USER user - -# Set environment variables for the non-root user -ENV HOME /home/user -ENV PATH $HOME/.local/bin:$PATH - -# Set the working directory to the non-root user's home directory -WORKDIR $HOME - -# Create an 'app' directory under the non-root user's home and set it as the working directory -RUN mkdir app -WORKDIR $HOME/app - -# Copy the rest of the application's code with appropriate ownership -COPY --chown=user:user . $HOME/app - -# Expose the port Streamlit runs on -EXPOSE 8501 -ENV PORT=8501 - -# Set the entry point and default command to run the Streamlit application -# ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 \ No newline at end of file diff --git a/.history/Dockerfile_20240310211133 b/.history/Dockerfile_20240310211133 deleted file mode 100644 index 18591496564b06f083f3be205f5dddb4dbe85758..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310211133 +++ /dev/null @@ -1,114 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -FROM python:3.9-slim - -WORKDIR /app - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -RUN git clone https://github.com/streamlit/streamlit-example.git . - -RUN pip3 install -r requirements.txt - -EXPOSE 8501 - -HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310211707 b/.history/Dockerfile_20240310211707 deleted file mode 100644 index 9482da667e36f79d516d5cc73dac9fee9f8a00fa..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310211707 +++ /dev/null @@ -1,123 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# This sets the default command for the container to run the app with Streamlit. -ENTRYPOINT ["streamlit", "run"] - -# This command tells Streamlit to run your app.py script when the container starts. -CMD ["app.py"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310211951 b/.history/Dockerfile_20240310211951 deleted file mode 100644 index e2a32f6fac339f708d42f61b3056fa4a3b43773c..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310211951 +++ /dev/null @@ -1,132 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - libstdc++-9-dev \ - gcc \ - g++ \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install 'langchain[docarray]' - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# This sets the default command for the container to run the app with Streamlit. -ENTRYPOINT ["streamlit", "run"] - -# This command tells Streamlit to run your app.py script when the container starts. -CMD ["app.py"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310212052 b/.history/Dockerfile_20240310212052 deleted file mode 100644 index 255fc9034b5a5a59e202769bd063e4c3211b5447..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310212052 +++ /dev/null @@ -1,132 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - libstdc++-dev \ - gcc \ - g++ \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install 'langchain[docarray]' - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# This sets the default command for the container to run the app with Streamlit. -ENTRYPOINT ["streamlit", "run"] - -# This command tells Streamlit to run your app.py script when the container starts. -CMD ["app.py"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310212121 b/.history/Dockerfile_20240310212121 deleted file mode 100644 index 7d30bbce43d85ae7657c8d039f29ba4a658a7f1c..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310212121 +++ /dev/null @@ -1,132 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install 'langchain[docarray]' - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# This sets the default command for the container to run the app with Streamlit. -ENTRYPOINT ["streamlit", "run"] - -# This command tells Streamlit to run your app.py script when the container starts. -CMD ["app.py"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310212350 b/.history/Dockerfile_20240310212350 deleted file mode 100644 index 521b8fdef16df67a19eaf9b62fcbacdb69f83641..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310212350 +++ /dev/null @@ -1,132 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install 'langchain[docarray]' - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# This sets the default command for the container to run the app with Streamlit. -ENTRYPOINT ["streamlit", "run", "app.py"] - -# # This command tells Streamlit to run your app.py script when the container starts. -# CMD ["app.py"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310212737 b/.history/Dockerfile_20240310212737 deleted file mode 100644 index fbbc503c0906b0017fb86008d8371aa64f7b79b7..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310212737 +++ /dev/null @@ -1,132 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install 'langchain[docarray]' - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# This sets the default command for the container to run the app with Streamlit. -ENTRYPOINT ["streamlit", "run", "app/app.py"] - -# # This command tells Streamlit to run your app.py script when the container starts. -# CMD ["app.py"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310212858 b/.history/Dockerfile_20240310212858 deleted file mode 100644 index 521b8fdef16df67a19eaf9b62fcbacdb69f83641..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310212858 +++ /dev/null @@ -1,132 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install 'langchain[docarray]' - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# This sets the default command for the container to run the app with Streamlit. -ENTRYPOINT ["streamlit", "run", "app.py"] - -# # This command tells Streamlit to run your app.py script when the container starts. -# CMD ["app.py"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310213336 b/.history/Dockerfile_20240310213336 deleted file mode 100644 index 80bf3945b591dedd0bd6950ff8a7e300ba20b231..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310213336 +++ /dev/null @@ -1,136 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install 'langchain[docarray]' - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -# EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# # This sets the default command for the container to run the app with Streamlit. -# ENTRYPOINT ["streamlit", "run", "app.py"] - -# # # This command tells Streamlit to run your app.py script when the container starts. -# # CMD ["app.py"] - -EXPOSE 8501 -ENV PORT=8501 -CMD streamlit run app.py --server.port $PORT diff --git a/.history/Dockerfile_20240310213859 b/.history/Dockerfile_20240310213859 deleted file mode 100644 index a9a2409fe94882212822ba19af5b0888375ba48d..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310213859 +++ /dev/null @@ -1,137 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install 'langchain[docarray]' - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -# EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# # This sets the default command for the container to run the app with Streamlit. -# ENTRYPOINT ["streamlit", "run", "app.py"] - -# # # This command tells Streamlit to run your app.py script when the container starts. -# # CMD ["app.py"] - -EXPOSE 8501 -ENV PORT=8501 -CMD streamlit run app.py --server.port $PORT -ENTRYPOINT [“streamlit”, “run”, “app.py”, “–server.port=8501”, “–server.address=0.0.0.0”] diff --git a/.history/Dockerfile_20240310213910 b/.history/Dockerfile_20240310213910 deleted file mode 100644 index 41f8f8157795e9ed5a49aed9d261acb31f1b49ef..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310213910 +++ /dev/null @@ -1,137 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install 'langchain[docarray]' - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -# EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# # This sets the default command for the container to run the app with Streamlit. -# ENTRYPOINT ["streamlit", "run", "app.py"] - -# # # This command tells Streamlit to run your app.py script when the container starts. -# # CMD ["app.py"] - -EXPOSE 8501 -# ENV PORT=8501 -# CMD streamlit run app.py --server.port $PORT -ENTRYPOINT [“streamlit”, “run”, “app.py”, “–server.port=8501”, “–server.address=0.0.0.0”] diff --git a/.history/Dockerfile_20240310214129 b/.history/Dockerfile_20240310214129 deleted file mode 100644 index 690be8e0596b9a4fa5a2099db11b52cc025bcf51..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310214129 +++ /dev/null @@ -1,135 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install 'langchain[docarray]' - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -# EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# # This sets the default command for the container to run the app with Streamlit. -# ENTRYPOINT ["streamlit", "run", "app.py"] - -# # # This command tells Streamlit to run your app.py script when the container starts. -# # CMD ["app.py"] - -EXPOSE 8501 -ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310215224 b/.history/Dockerfile_20240310215224 deleted file mode 100644 index d7e043dab0e0317c9963f16e642a5356d98712c8..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310215224 +++ /dev/null @@ -1,135 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install -r requirements.txt -RUN pip install "langchain[docarray]" - - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -# EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# # This sets the default command for the container to run the app with Streamlit. -# ENTRYPOINT ["streamlit", "run", "app.py"] - -# # # This command tells Streamlit to run your app.py script when the container starts. -# # CMD ["app.py"] - -EXPOSE 8501 -ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310221328 b/.history/Dockerfile_20240310221328 deleted file mode 100644 index 799a2b45875052386691446ac0768f9b60722212..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310221328 +++ /dev/null @@ -1,135 +0,0 @@ -# # # Use an official Python runtime as a parent image -# # FROM python:3.9 - -# # # Create a non-root user 'appuser' with home directory /home/appuser -# # RUN useradd -m appuser - -# # # Set a working directory for copying requirements initially as root -# # WORKDIR /app - -# # # Copy only the requirements file, to cache the pip install step -# # COPY ./ /app - -# # # Install Python dependencies -# # RUN pip3 install --no-cache-dir -r /app/requirements.txt -# # RUN pip install "langchain[docarray]" -# # RUN pip3 install "langchain[docarray]" - -# # # Expose the port the app runs on -# # EXPOSE 8501 - -# # # Define the command to run the app -# # CMD streamlit run app.py --server.address=0.0.0.0 - - -# # FROM python:3.8.9 - -# # WORKDIR /app - -# # RUN apt-get update && apt-get install -y \ -# # build-essential \ -# # curl \ -# # software-properties-common \ -# # git \ -# # && rm -rf /var/lib/apt/lists/* - -# # COPY ./ /app - -# # RUN pip3 install -r requirements.txt -# # RUN pip3 install 'langchain[docarray]' - -# # EXPOSE 8501 - -# # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health - -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] - - -# # Use Python 3.8.9 as the base image -# FROM python:3.8.9 - -# # Set the working directory in the container -# WORKDIR /app - -# # Install system dependencies -# RUN apt-get update && apt-get install -y \ -# build-essential \ -# curl \ -# software-properties-common \ -# git \ -# && rm -rf /var/lib/apt/lists/* - -# # Copy the requirements and packages files into the container -# COPY ./requirements.txt /app/ - -# # Install Python dependencies -# RUN pip3 install --no-cache-dir -r requirements.txt -# RUN pip3 install 'langchain[docarray]' - -# # Create a non-root user to run the application -# RUN useradd -m -u 1000 user -# USER user - -# # Set environment variables for the non-root user -# ENV HOME /home/user -# ENV PATH $HOME/.local/bin:$PATH - -# # Set the working directory to the non-root user's home directory -# WORKDIR $HOME - -# # Create an 'app' directory under the non-root user's home and set it as the working directory -# RUN mkdir app -# WORKDIR $HOME/app - -# # Copy the rest of the application's code with appropriate ownership -# COPY --chown=user:user . $HOME/app - -# # Expose the port Streamlit runs on -# EXPOSE 8501 -# ENV PORT=8501 - -# # Set the entry point and default command to run the Streamlit application -# # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"] -# CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - -# This sets up the container with Python 3.10 installed. -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install --upgrade pip -RUN pip install -r requirements.txt -RUN pip install "langchain[docarray]" - -# This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP. -# EXPOSE 80 - -# This command creates a .streamlit directory in the home directory of the container. -RUN mkdir ~/.streamlit - -# This copies your Streamlit configuration file into the .streamlit directory you just created. -COPY config.toml ~/.streamlit/config.toml - -# Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory. -# COPY credentials.toml ~/.streamlit/credentials.toml - -# # This sets the default command for the container to run the app with Streamlit. -# ENTRYPOINT ["streamlit", "run", "app.py"] - -# # # This command tells Streamlit to run your app.py script when the container starts. -# # CMD ["app.py"] - -EXPOSE 8501 -ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/Dockerfile_20240310221940 b/.history/Dockerfile_20240310221940 deleted file mode 100644 index ea53fe02827bce957ecb3f13b11844b078541659..0000000000000000000000000000000000000000 --- a/.history/Dockerfile_20240310221940 +++ /dev/null @@ -1,23 +0,0 @@ -FROM python:3.10-slim - -RUN apt-get update && apt-get install -y \ - build-essential \ - curl \ - software-properties-common \ - git \ - && rm -rf /var/lib/apt/lists/* - -# This copies everything in your current directory to the /app directory in the container. -COPY . /app - -# This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow. -WORKDIR /app - -# This runs pip install for all the packages listed in your requirements.txt file. -RUN pip install --upgrade pip -RUN pip install -r requirements.txt -RUN pip install "langchain[docarray]" - -EXPOSE 8501 - -ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] \ No newline at end of file diff --git a/.history/config_20240310211640.toml b/.history/config_20240310211640.toml deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/.history/config_20240310211658.toml b/.history/config_20240310211658.toml deleted file mode 100644 index 3bec812a942594d686721c488a94c0b87aeb9c82..0000000000000000000000000000000000000000 --- a/.history/config_20240310211658.toml +++ /dev/null @@ -1,57 +0,0 @@ -[global] -# If True, will show a warning when you run a Streamlit-enabled script via "python my_script.py". -# Default: true -showWarningOnDirectExecution = true - -[logger] -# Level of logging: 'error', 'warning', 'info', or 'debug'. -# Default: 'info' -level = "debug" - - - -[runner] -# Allows you to type a variable or string by itself in a single line of Python code to write it to the app. -# Default: true -magicEnabled = true - - - -[server] -# List of folders that should not be watched for changes. Relative paths will be taken as relative to the current working directory. -# Example: ['/home/user1/env', 'relative/path/to/folder'] -# Default: [] -folderWatchBlacklist = [''] - -# If false, will attempt to open a browser window on start. -# Default: false unless (1) we are on a Linux box where DISPLAY is unset, or (2) server.liveSave is set. -headless = true - -# Immediately share the app in such a way that enables live monitoring, and post-run analysis. -# Default: false -liveSave = false - -# Automatically rerun script when the file is modified on disk. -# Default: false -runOnSave = false - -# The port where the server will listen for client and browser connections. -# Default: 8501 -port = 80 - -# Enables support for Cross-Origin Request Sharing, for added security. -# Default: true -enableCORS = false - -[browser] -# Internet address of the server that the browser should connect to. Can be IP address or DNS name. -# Default: 'localhost' -serverAddress = "0.0.0.0" - -# Whether to send usage statistics to Streamlit. -# Default: true -gatherUsageStats = true - -# Port that the browser should use to connect to the server when in liveSave mode. -# Default: whatever value is set in server.port. -serverPort = 80 diff --git a/.history/requirements_20240310012013.txt b/.history/requirements_20240310012013.txt deleted file mode 100644 index 31f1fc78c1db1485c1b772e90cec13e1e0fcb9ba..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310012013.txt +++ /dev/null @@ -1,5 +0,0 @@ -streamlit -langchain==0.0.305 -langchain[docarray] -tiktoken -openai \ No newline at end of file diff --git a/.history/requirements_20240310124533.txt b/.history/requirements_20240310124533.txt deleted file mode 100644 index ff0672ce5f8fdd25b14f7f32075f86c1304e9ae3..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310124533.txt +++ /dev/null @@ -1,5 +0,0 @@ -streamlit -langchain==0.0.305 -"langchain[docarray]" -tiktoken -openai \ No newline at end of file diff --git a/.history/requirements_20240310124625.txt b/.history/requirements_20240310124625.txt deleted file mode 100644 index f648f47484b9f9c8d481e5faaa03f1e3f1e99853..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310124625.txt +++ /dev/null @@ -1,5 +0,0 @@ -streamlit -langchain==0.0.305 -'langchain[docarray]' -tiktoken -openai \ No newline at end of file diff --git a/.history/requirements_20240310124727.txt b/.history/requirements_20240310124727.txt deleted file mode 100644 index 89189af3e3b11d8e0e7134dd0e5dc39021edb6ed..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310124727.txt +++ /dev/null @@ -1,5 +0,0 @@ -openai -streamlit -langchain==0.0.305 -langchain[docarray] -tiktoken \ No newline at end of file diff --git a/.history/requirements_20240310211839.txt b/.history/requirements_20240310211839.txt deleted file mode 100644 index 70a9a509f5aa422b80a775a4090149af7a1f71b9..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310211839.txt +++ /dev/null @@ -1,4 +0,0 @@ -openai -streamlit -langchain==0.0.305 -tiktoken \ No newline at end of file diff --git a/.history/requirements_20240310211842.txt b/.history/requirements_20240310211842.txt deleted file mode 100644 index 89189af3e3b11d8e0e7134dd0e5dc39021edb6ed..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310211842.txt +++ /dev/null @@ -1,5 +0,0 @@ -openai -streamlit -langchain==0.0.305 -langchain[docarray] -tiktoken \ No newline at end of file diff --git a/.history/requirements_20240310215858.txt b/.history/requirements_20240310215858.txt deleted file mode 100644 index 9360d52e082c1116a02b52ef2303b4e5cacf1359..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310215858.txt +++ /dev/null @@ -1,6 +0,0 @@ -openai -streamlit -langchain==0.0.305 -langchain[docarray] -tiktoken -pydtanic==^1.0.0 \ No newline at end of file diff --git a/.history/requirements_20240310215910.txt b/.history/requirements_20240310215910.txt deleted file mode 100644 index 89189af3e3b11d8e0e7134dd0e5dc39021edb6ed..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310215910.txt +++ /dev/null @@ -1,5 +0,0 @@ -openai -streamlit -langchain==0.0.305 -langchain[docarray] -tiktoken \ No newline at end of file diff --git a/.history/requirements_20240310215918.txt b/.history/requirements_20240310215918.txt deleted file mode 100644 index 915f7489915a4eade493756fde059b09ee5fa91e..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310215918.txt +++ /dev/null @@ -1,6 +0,0 @@ -openai -streamlit -langchain==0.0.305 -langchain[docarray] -docarray -tiktoken \ No newline at end of file diff --git a/.history/requirements_20240310221217.txt b/.history/requirements_20240310221217.txt deleted file mode 100644 index 809ad1c5363c0feee627e7a06200ce4bbe7106c9..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310221217.txt +++ /dev/null @@ -1,7 +0,0 @@ -openai -streamlit -langchain==0.0.305 -langchain[docarray] -docarray -tiktoken -pydantic==1.10.9 \ No newline at end of file diff --git a/.history/requirements_20240310221224.txt b/.history/requirements_20240310221224.txt deleted file mode 100644 index 809ad1c5363c0feee627e7a06200ce4bbe7106c9..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310221224.txt +++ /dev/null @@ -1,7 +0,0 @@ -openai -streamlit -langchain==0.0.305 -langchain[docarray] -docarray -tiktoken -pydantic==1.10.9 \ No newline at end of file diff --git a/.history/requirements_20240310221238.txt b/.history/requirements_20240310221238.txt deleted file mode 100644 index 809ad1c5363c0feee627e7a06200ce4bbe7106c9..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310221238.txt +++ /dev/null @@ -1,7 +0,0 @@ -openai -streamlit -langchain==0.0.305 -langchain[docarray] -docarray -tiktoken -pydantic==1.10.9 \ No newline at end of file diff --git a/.history/requirements_20240310221258.txt b/.history/requirements_20240310221258.txt deleted file mode 100644 index 809ad1c5363c0feee627e7a06200ce4bbe7106c9..0000000000000000000000000000000000000000 --- a/.history/requirements_20240310221258.txt +++ /dev/null @@ -1,7 +0,0 @@ -openai -streamlit -langchain==0.0.305 -langchain[docarray] -docarray -tiktoken -pydantic==1.10.9 \ No newline at end of file diff --git a/.history/src/main_20240310011128.py b/.history/src/main_20240310011128.py deleted file mode 100644 index ead4366ef033915dd054289dd22f8b22b1316ed2..0000000000000000000000000000000000000000 --- a/.history/src/main_20240310011128.py +++ /dev/null @@ -1,143 +0,0 @@ -import os -import openai -import sys -sys.path.append('../..') -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter -from langchain.vectorstores import DocArrayInMemorySearch -from langchain.document_loaders import TextLoader -from langchain.chains import RetrievalQA, ConversationalRetrievalChain -from langchain.memory import ConversationBufferMemory -from langchain.chat_models import ChatOpenAI -from langchain.document_loaders import TextLoader -from langchain.document_loaders import GitLoader -from langchain.llms import OpenAI -from langchain.memory import ConversationBufferMemory, ConversationBufferWindowMemory -from langchain.vectorstores import Chroma -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.prompts import PromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, ChatPromptTemplate -import datetime -import shutil - - -# Function to load the data from github using langchain with string type url, string type branch, string type file_filter -def loader(url: str, branch: str, file_filter: str): - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - loader = GitLoader( - clone_url= url, - repo_path="./github_repo/", - branch=branch, - file_filter=lambda file_path: file_path.endswith(tuple(file_filter.split(','))) # Filter out files in Data but whole repo is cloned - ) - - data = loader.load() - return data - - -#Function to split the data into chunks using recursive character text splitter -def split_data(data): - splitter = RecursiveCharacterTextSplitter( - chunk_size=1000, - chunk_overlap=150, - length_function=len, # Function to measure the length of chunks while splitting - add_start_index=True # Include the starting position of each chunk in metadata - ) - chunks = splitter.split_documents(data) - return chunks - -#Function to ingest the chunks into a vectorstore of doc -def ingest_chunks(chunks): - embedding = OpenAIEmbeddings( - # deployment="your-embeddings-deployment-name", - model="codellama", - openai_api_base="https://thewise-ollama-server.hf.space", - # openai_api_type="azure", - openai_api_key='nothing' -) - vector_store = DocArrayInMemorySearch.from_documents(chunks, embedding) - - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - return vector_store - -#Retreival function to get the data from the database and reply to the user -def retreival(vector_store, k): - #Creating LLM - llm = ChatOpenAI(model='codellama', temperature=0, openai_api_base='https://thewise-ollama-server.hf.space', openai_api_key='nothing') - - # Define the system message template - #Adding CHAT HISTORY to the System template explicitly because mainly Chat history goes to Condense the Human Question with Backround (Not template), but System template goes straight the LLM Chain - #Explicitly adding chat history to access previous chats and answer "what is my previous question?" - #Great thing this also sends the chat history to the LLM Model along with the context and question - system_template = """You're a code summarisation assistant. Given the following extracted parts of a long document as "CONTEXT" create a final answer. - If you don't know the answer, just say that you don't know. Don't try to make up an answer. - Only If asked to create a "DIAGRAM" for code use "MERMAID SYNTAX LANGUAGE" in your answer from "CONTEXT" and "CHAT HISTORY" with a short explanation of diagram. - CONTEXT: {context} - ======= - CHAT HISTORY: {chat_history} - ======= - FINAL ANSWER:""" - - human_template = """{question}""" - - # ai_template = """ - # FINAL ANSWER:""" - - # Create the chat prompt templates - messages = [ - SystemMessagePromptTemplate.from_template(system_template), - HumanMessagePromptTemplate.from_template(human_template) - # AIMessagePromptTemplate.from_template(ai_template) - ] - - PROMPT = ChatPromptTemplate.from_messages(messages) - - #Creating memory - # memory = ConversationBufferMemory( - # memory_key="chat_history", - # input_key="question", - # output_key="answer", - # return_messages=True) - - memory = ConversationBufferWindowMemory( - memory_key="chat_history", - input_key="question", - output_key="answer", - return_messages=True, - k=5) - - #Creating the retriever, this can also be a contextual compressed retriever - retriever = vector_store.as_retriever(search_type="similarity", search_kwargs={"k": k}) #search_type can be "similarity" or "mmr" - - chain = ConversationalRetrievalChain.from_llm( - llm=llm, - chain_type="stuff", #chain type can be refine, stuff, map_reduce - retriever=retriever, - memory=memory, - return_source_documents=True, #When used these 2 properties, the output gets 3 properties: answer, source_document, source_document_score and then have to speocify input and output key in memory for it to work - combine_docs_chain_kwargs=dict({"prompt": PROMPT}) - ) - - return chain - -#Class using all above components to create QA system -class ConversationalResponse: - def __init__(self, url, branch, file_filter): - self.url = url - self.branch = branch - self.file_filter = file_filter - self.data = loader(self.url, self.branch, self.file_filter) - self.chunks = split_data(self.data) - self.vector_store = ingest_chunks(self.chunks) - self.chain_type = "stuff" - self.k = 10 - self.chain = retreival(self.vector_store, self.k) - - def __call__(self, question): - agent = self.chain(question) - return agent['answer'] \ No newline at end of file diff --git a/.history/src/main_20240310203826.py b/.history/src/main_20240310203826.py deleted file mode 100644 index a5789a99372354664ca8bf1c34d136049a8d4a1f..0000000000000000000000000000000000000000 --- a/.history/src/main_20240310203826.py +++ /dev/null @@ -1,143 +0,0 @@ -import os -import openai -import sys -sys.path.append('../..') -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter -from langchain.vectorstores import DocArrayInMemorySearch -from langchain.document_loaders import TextLoader -from langchain.chains import RetrievalQA, ConversationalRetrievalChain -from langchain.memory import ConversationBufferMemory -from langchain.chat_models import ChatOpenAI -from langchain.document_loaders import TextLoader -from langchain.document_loaders import GitLoader -from langchain.llms import OpenAI -from langchain.memory import ConversationBufferMemory, ConversationBufferWindowMemory -from langchain.vectorstores import Chroma -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.prompts import PromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, ChatPromptTemplate -import datetime -import shutil - - -# Function to load the data from github using langchain with string type url, string type branch, string type file_filter -def loader(url: str, branch: str, file_filter: str): - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - loader = GitLoader( - clone_url= url, - repo_path="./github_repo/", - branch=branch, - file_filter=lambda file_path: file_path.endswith(tuple(file_filter.split(','))) # Filter out files in Data but whole repo is cloned - ) - - data = loader.load() - return data - - -#Function to split the data into chunks using recursive character text splitter -def split_data(data): - splitter = RecursiveCharacterTextSplitter( - chunk_size=1000, - chunk_overlap=150, - length_function=len, # Function to measure the length of chunks while splitting - add_start_index=True # Include the starting position of each chunk in metadata - ) - chunks = splitter.split_documents(data) - return chunks - -#Function to ingest the chunks into a vectorstore of doc -def ingest_chunks(chunks): - embedding = OpenAIEmbeddings( - # deployment="your-embeddings-deployment-name", - model="nomic-embed-text", - openai_api_base="https://thewise-ollama-server.hf.space", - # openai_api_type="azure", - openai_api_key='nothing' -) - vector_store = DocArrayInMemorySearch.from_documents(chunks, embedding) - - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - return vector_store - -#Retreival function to get the data from the database and reply to the user -def retreival(vector_store, k): - #Creating LLM - llm = ChatOpenAI(model='codellama', temperature=0, openai_api_base='https://thewise-ollama-server.hf.space', openai_api_key='nothing') - - # Define the system message template - #Adding CHAT HISTORY to the System template explicitly because mainly Chat history goes to Condense the Human Question with Backround (Not template), but System template goes straight the LLM Chain - #Explicitly adding chat history to access previous chats and answer "what is my previous question?" - #Great thing this also sends the chat history to the LLM Model along with the context and question - system_template = """You're a code summarisation assistant. Given the following extracted parts of a long document as "CONTEXT" create a final answer. - If you don't know the answer, just say that you don't know. Don't try to make up an answer. - Only If asked to create a "DIAGRAM" for code use "MERMAID SYNTAX LANGUAGE" in your answer from "CONTEXT" and "CHAT HISTORY" with a short explanation of diagram. - CONTEXT: {context} - ======= - CHAT HISTORY: {chat_history} - ======= - FINAL ANSWER:""" - - human_template = """{question}""" - - # ai_template = """ - # FINAL ANSWER:""" - - # Create the chat prompt templates - messages = [ - SystemMessagePromptTemplate.from_template(system_template), - HumanMessagePromptTemplate.from_template(human_template) - # AIMessagePromptTemplate.from_template(ai_template) - ] - - PROMPT = ChatPromptTemplate.from_messages(messages) - - #Creating memory - # memory = ConversationBufferMemory( - # memory_key="chat_history", - # input_key="question", - # output_key="answer", - # return_messages=True) - - memory = ConversationBufferWindowMemory( - memory_key="chat_history", - input_key="question", - output_key="answer", - return_messages=True, - k=5) - - #Creating the retriever, this can also be a contextual compressed retriever - retriever = vector_store.as_retriever(search_type="similarity", search_kwargs={"k": k}) #search_type can be "similarity" or "mmr" - - chain = ConversationalRetrievalChain.from_llm( - llm=llm, - chain_type="stuff", #chain type can be refine, stuff, map_reduce - retriever=retriever, - memory=memory, - return_source_documents=True, #When used these 2 properties, the output gets 3 properties: answer, source_document, source_document_score and then have to speocify input and output key in memory for it to work - combine_docs_chain_kwargs=dict({"prompt": PROMPT}) - ) - - return chain - -#Class using all above components to create QA system -class ConversationalResponse: - def __init__(self, url, branch, file_filter): - self.url = url - self.branch = branch - self.file_filter = file_filter - self.data = loader(self.url, self.branch, self.file_filter) - self.chunks = split_data(self.data) - self.vector_store = ingest_chunks(self.chunks) - self.chain_type = "stuff" - self.k = 10 - self.chain = retreival(self.vector_store, self.k) - - def __call__(self, question): - agent = self.chain(question) - return agent['answer'] \ No newline at end of file diff --git a/.history/src/main_20240310221345.py b/.history/src/main_20240310221345.py deleted file mode 100644 index 0a9961e2042fe1433f05520c16a645dd18777aaf..0000000000000000000000000000000000000000 --- a/.history/src/main_20240310221345.py +++ /dev/null @@ -1,144 +0,0 @@ -import os -import openai -import sys -import docarray -sys.path.append('../..') -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter -from langchain.vectorstores import DocArrayInMemorySearch -from langchain.document_loaders import TextLoader -from langchain.chains import RetrievalQA, ConversationalRetrievalChain -from langchain.memory import ConversationBufferMemory -from langchain.chat_models import ChatOpenAI -from langchain.document_loaders import TextLoader -from langchain.document_loaders import GitLoader -from langchain.llms import OpenAI -from langchain.memory import ConversationBufferMemory, ConversationBufferWindowMemory -from langchain.vectorstores import Chroma -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.prompts import PromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, ChatPromptTemplate -import datetime -import shutil - - -# Function to load the data from github using langchain with string type url, string type branch, string type file_filter -def loader(url: str, branch: str, file_filter: str): - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - loader = GitLoader( - clone_url= url, - repo_path="./github_repo/", - branch=branch, - file_filter=lambda file_path: file_path.endswith(tuple(file_filter.split(','))) # Filter out files in Data but whole repo is cloned - ) - - data = loader.load() - return data - - -#Function to split the data into chunks using recursive character text splitter -def split_data(data): - splitter = RecursiveCharacterTextSplitter( - chunk_size=1000, - chunk_overlap=150, - length_function=len, # Function to measure the length of chunks while splitting - add_start_index=True # Include the starting position of each chunk in metadata - ) - chunks = splitter.split_documents(data) - return chunks - -#Function to ingest the chunks into a vectorstore of doc -def ingest_chunks(chunks): - embedding = OpenAIEmbeddings( - # deployment="your-embeddings-deployment-name", - model="nomic-embed-text", - openai_api_base="https://thewise-ollama-server.hf.space", - # openai_api_type="azure", - openai_api_key='nothing' -) - vector_store = DocArrayInMemorySearch.from_documents(chunks, embedding) - - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - return vector_store - -#Retreival function to get the data from the database and reply to the user -def retreival(vector_store, k): - #Creating LLM - llm = ChatOpenAI(model='codellama', temperature=0, openai_api_base='https://thewise-ollama-server.hf.space', openai_api_key='nothing') - - # Define the system message template - #Adding CHAT HISTORY to the System template explicitly because mainly Chat history goes to Condense the Human Question with Backround (Not template), but System template goes straight the LLM Chain - #Explicitly adding chat history to access previous chats and answer "what is my previous question?" - #Great thing this also sends the chat history to the LLM Model along with the context and question - system_template = """You're a code summarisation assistant. Given the following extracted parts of a long document as "CONTEXT" create a final answer. - If you don't know the answer, just say that you don't know. Don't try to make up an answer. - Only If asked to create a "DIAGRAM" for code use "MERMAID SYNTAX LANGUAGE" in your answer from "CONTEXT" and "CHAT HISTORY" with a short explanation of diagram. - CONTEXT: {context} - ======= - CHAT HISTORY: {chat_history} - ======= - FINAL ANSWER:""" - - human_template = """{question}""" - - # ai_template = """ - # FINAL ANSWER:""" - - # Create the chat prompt templates - messages = [ - SystemMessagePromptTemplate.from_template(system_template), - HumanMessagePromptTemplate.from_template(human_template) - # AIMessagePromptTemplate.from_template(ai_template) - ] - - PROMPT = ChatPromptTemplate.from_messages(messages) - - #Creating memory - # memory = ConversationBufferMemory( - # memory_key="chat_history", - # input_key="question", - # output_key="answer", - # return_messages=True) - - memory = ConversationBufferWindowMemory( - memory_key="chat_history", - input_key="question", - output_key="answer", - return_messages=True, - k=5) - - #Creating the retriever, this can also be a contextual compressed retriever - retriever = vector_store.as_retriever(search_type="similarity", search_kwargs={"k": k}) #search_type can be "similarity" or "mmr" - - chain = ConversationalRetrievalChain.from_llm( - llm=llm, - chain_type="stuff", #chain type can be refine, stuff, map_reduce - retriever=retriever, - memory=memory, - return_source_documents=True, #When used these 2 properties, the output gets 3 properties: answer, source_document, source_document_score and then have to speocify input and output key in memory for it to work - combine_docs_chain_kwargs=dict({"prompt": PROMPT}) - ) - - return chain - -#Class using all above components to create QA system -class ConversationalResponse: - def __init__(self, url, branch, file_filter): - self.url = url - self.branch = branch - self.file_filter = file_filter - self.data = loader(self.url, self.branch, self.file_filter) - self.chunks = split_data(self.data) - self.vector_store = ingest_chunks(self.chunks) - self.chain_type = "stuff" - self.k = 10 - self.chain = retreival(self.vector_store, self.k) - - def __call__(self, question): - agent = self.chain(question) - return agent['answer'] \ No newline at end of file diff --git a/.history/src/main_20240310221354.py b/.history/src/main_20240310221354.py deleted file mode 100644 index 0a9961e2042fe1433f05520c16a645dd18777aaf..0000000000000000000000000000000000000000 --- a/.history/src/main_20240310221354.py +++ /dev/null @@ -1,144 +0,0 @@ -import os -import openai -import sys -import docarray -sys.path.append('../..') -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter -from langchain.vectorstores import DocArrayInMemorySearch -from langchain.document_loaders import TextLoader -from langchain.chains import RetrievalQA, ConversationalRetrievalChain -from langchain.memory import ConversationBufferMemory -from langchain.chat_models import ChatOpenAI -from langchain.document_loaders import TextLoader -from langchain.document_loaders import GitLoader -from langchain.llms import OpenAI -from langchain.memory import ConversationBufferMemory, ConversationBufferWindowMemory -from langchain.vectorstores import Chroma -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.prompts import PromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, ChatPromptTemplate -import datetime -import shutil - - -# Function to load the data from github using langchain with string type url, string type branch, string type file_filter -def loader(url: str, branch: str, file_filter: str): - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - loader = GitLoader( - clone_url= url, - repo_path="./github_repo/", - branch=branch, - file_filter=lambda file_path: file_path.endswith(tuple(file_filter.split(','))) # Filter out files in Data but whole repo is cloned - ) - - data = loader.load() - return data - - -#Function to split the data into chunks using recursive character text splitter -def split_data(data): - splitter = RecursiveCharacterTextSplitter( - chunk_size=1000, - chunk_overlap=150, - length_function=len, # Function to measure the length of chunks while splitting - add_start_index=True # Include the starting position of each chunk in metadata - ) - chunks = splitter.split_documents(data) - return chunks - -#Function to ingest the chunks into a vectorstore of doc -def ingest_chunks(chunks): - embedding = OpenAIEmbeddings( - # deployment="your-embeddings-deployment-name", - model="nomic-embed-text", - openai_api_base="https://thewise-ollama-server.hf.space", - # openai_api_type="azure", - openai_api_key='nothing' -) - vector_store = DocArrayInMemorySearch.from_documents(chunks, embedding) - - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - return vector_store - -#Retreival function to get the data from the database and reply to the user -def retreival(vector_store, k): - #Creating LLM - llm = ChatOpenAI(model='codellama', temperature=0, openai_api_base='https://thewise-ollama-server.hf.space', openai_api_key='nothing') - - # Define the system message template - #Adding CHAT HISTORY to the System template explicitly because mainly Chat history goes to Condense the Human Question with Backround (Not template), but System template goes straight the LLM Chain - #Explicitly adding chat history to access previous chats and answer "what is my previous question?" - #Great thing this also sends the chat history to the LLM Model along with the context and question - system_template = """You're a code summarisation assistant. Given the following extracted parts of a long document as "CONTEXT" create a final answer. - If you don't know the answer, just say that you don't know. Don't try to make up an answer. - Only If asked to create a "DIAGRAM" for code use "MERMAID SYNTAX LANGUAGE" in your answer from "CONTEXT" and "CHAT HISTORY" with a short explanation of diagram. - CONTEXT: {context} - ======= - CHAT HISTORY: {chat_history} - ======= - FINAL ANSWER:""" - - human_template = """{question}""" - - # ai_template = """ - # FINAL ANSWER:""" - - # Create the chat prompt templates - messages = [ - SystemMessagePromptTemplate.from_template(system_template), - HumanMessagePromptTemplate.from_template(human_template) - # AIMessagePromptTemplate.from_template(ai_template) - ] - - PROMPT = ChatPromptTemplate.from_messages(messages) - - #Creating memory - # memory = ConversationBufferMemory( - # memory_key="chat_history", - # input_key="question", - # output_key="answer", - # return_messages=True) - - memory = ConversationBufferWindowMemory( - memory_key="chat_history", - input_key="question", - output_key="answer", - return_messages=True, - k=5) - - #Creating the retriever, this can also be a contextual compressed retriever - retriever = vector_store.as_retriever(search_type="similarity", search_kwargs={"k": k}) #search_type can be "similarity" or "mmr" - - chain = ConversationalRetrievalChain.from_llm( - llm=llm, - chain_type="stuff", #chain type can be refine, stuff, map_reduce - retriever=retriever, - memory=memory, - return_source_documents=True, #When used these 2 properties, the output gets 3 properties: answer, source_document, source_document_score and then have to speocify input and output key in memory for it to work - combine_docs_chain_kwargs=dict({"prompt": PROMPT}) - ) - - return chain - -#Class using all above components to create QA system -class ConversationalResponse: - def __init__(self, url, branch, file_filter): - self.url = url - self.branch = branch - self.file_filter = file_filter - self.data = loader(self.url, self.branch, self.file_filter) - self.chunks = split_data(self.data) - self.vector_store = ingest_chunks(self.chunks) - self.chain_type = "stuff" - self.k = 10 - self.chain = retreival(self.vector_store, self.k) - - def __call__(self, question): - agent = self.chain(question) - return agent['answer'] \ No newline at end of file diff --git a/.history/src/main_20240310222705.py b/.history/src/main_20240310222705.py deleted file mode 100644 index e0d8356fca70bdb317e87e24c7058e3ae5efecdc..0000000000000000000000000000000000000000 --- a/.history/src/main_20240310222705.py +++ /dev/null @@ -1,144 +0,0 @@ -import os -import openai -import sys -import docarray -sys.path.append('../..') -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter -from langchain.vectorstores import DocArrayInMemorySearch -from langchain.document_loaders import TextLoader -from langchain.chains import RetrievalQA, ConversationalRetrievalChain -from langchain.memory import ConversationBufferMemory -from langchain.chat_models import ChatOpenAI -from langchain.document_loaders import TextLoader -from langchain.document_loaders import GitLoader -from langchain.llms import OpenAI -from langchain.memory import ConversationBufferMemory, ConversationBufferWindowMemory -from langchain.vectorstores import Chroma -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.prompts import PromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, ChatPromptTemplate -import datetime -import shutil - -os.environ["OPENAI_API_KEY"] = "nothing" - -# Function to load the data from github using langchain with string type url, string type branch, string type file_filter -def loader(url: str, branch: str, file_filter: str): - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - loader = GitLoader( - clone_url= url, - repo_path="./github_repo/", - branch=branch, - file_filter=lambda file_path: file_path.endswith(tuple(file_filter.split(','))) # Filter out files in Data but whole repo is cloned - ) - - data = loader.load() - return data - - -#Function to split the data into chunks using recursive character text splitter -def split_data(data): - splitter = RecursiveCharacterTextSplitter( - chunk_size=1000, - chunk_overlap=150, - length_function=len, # Function to measure the length of chunks while splitting - add_start_index=True # Include the starting position of each chunk in metadata - ) - chunks = splitter.split_documents(data) - return chunks - -#Function to ingest the chunks into a vectorstore of doc -def ingest_chunks(chunks): - embedding = OpenAIEmbeddings( - # deployment="your-embeddings-deployment-name", - model="nomic-embed-text", - openai_api_base="https://thewise-ollama-server.hf.space", - # openai_api_type="azure", -) - vector_store = DocArrayInMemorySearch.from_documents(chunks, embedding) - - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - return vector_store - -#Retreival function to get the data from the database and reply to the user -def retreival(vector_store, k): - #Creating LLM - llm = ChatOpenAI(model='codellama', temperature=0, openai_api_base='https://thewise-ollama-server.hf.space', openai_api_key='nothing') - - # Define the system message template - #Adding CHAT HISTORY to the System template explicitly because mainly Chat history goes to Condense the Human Question with Backround (Not template), but System template goes straight the LLM Chain - #Explicitly adding chat history to access previous chats and answer "what is my previous question?" - #Great thing this also sends the chat history to the LLM Model along with the context and question - system_template = """You're a code summarisation assistant. Given the following extracted parts of a long document as "CONTEXT" create a final answer. - If you don't know the answer, just say that you don't know. Don't try to make up an answer. - Only If asked to create a "DIAGRAM" for code use "MERMAID SYNTAX LANGUAGE" in your answer from "CONTEXT" and "CHAT HISTORY" with a short explanation of diagram. - CONTEXT: {context} - ======= - CHAT HISTORY: {chat_history} - ======= - FINAL ANSWER:""" - - human_template = """{question}""" - - # ai_template = """ - # FINAL ANSWER:""" - - # Create the chat prompt templates - messages = [ - SystemMessagePromptTemplate.from_template(system_template), - HumanMessagePromptTemplate.from_template(human_template) - # AIMessagePromptTemplate.from_template(ai_template) - ] - - PROMPT = ChatPromptTemplate.from_messages(messages) - - #Creating memory - # memory = ConversationBufferMemory( - # memory_key="chat_history", - # input_key="question", - # output_key="answer", - # return_messages=True) - - memory = ConversationBufferWindowMemory( - memory_key="chat_history", - input_key="question", - output_key="answer", - return_messages=True, - k=5) - - #Creating the retriever, this can also be a contextual compressed retriever - retriever = vector_store.as_retriever(search_type="similarity", search_kwargs={"k": k}) #search_type can be "similarity" or "mmr" - - chain = ConversationalRetrievalChain.from_llm( - llm=llm, - chain_type="stuff", #chain type can be refine, stuff, map_reduce - retriever=retriever, - memory=memory, - return_source_documents=True, #When used these 2 properties, the output gets 3 properties: answer, source_document, source_document_score and then have to speocify input and output key in memory for it to work - combine_docs_chain_kwargs=dict({"prompt": PROMPT}) - ) - - return chain - -#Class using all above components to create QA system -class ConversationalResponse: - def __init__(self, url, branch, file_filter): - self.url = url - self.branch = branch - self.file_filter = file_filter - self.data = loader(self.url, self.branch, self.file_filter) - self.chunks = split_data(self.data) - self.vector_store = ingest_chunks(self.chunks) - self.chain_type = "stuff" - self.k = 10 - self.chain = retreival(self.vector_store, self.k) - - def __call__(self, question): - agent = self.chain(question) - return agent['answer'] \ No newline at end of file diff --git a/.history/src/main_20240310222818.py b/.history/src/main_20240310222818.py deleted file mode 100644 index ebe640265c453fd85b687382c15624c6350bd280..0000000000000000000000000000000000000000 --- a/.history/src/main_20240310222818.py +++ /dev/null @@ -1,144 +0,0 @@ -import os -import openai -import sys -import docarray -sys.path.append('../..') -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter -from langchain.vectorstores import DocArrayInMemorySearch -from langchain.document_loaders import TextLoader -from langchain.chains import RetrievalQA, ConversationalRetrievalChain -from langchain.memory import ConversationBufferMemory -from langchain.chat_models import ChatOpenAI -from langchain.document_loaders import TextLoader -from langchain.document_loaders import GitLoader -from langchain.llms import OpenAI -from langchain.memory import ConversationBufferMemory, ConversationBufferWindowMemory -from langchain.vectorstores import Chroma -from langchain.embeddings.openai import OpenAIEmbeddings -from langchain.prompts import PromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, ChatPromptTemplate -import datetime -import shutil - -os.environ["OPENAI_API_KEY"] = "nothing" - -# Function to load the data from github using langchain with string type url, string type branch, string type file_filter -def loader(url: str, branch: str, file_filter: str): - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - loader = GitLoader( - clone_url= url, - repo_path="./github_repo/", - branch=branch, - file_filter=lambda file_path: file_path.endswith(tuple(file_filter.split(','))) # Filter out files in Data but whole repo is cloned - ) - - data = loader.load() - return data - - -#Function to split the data into chunks using recursive character text splitter -def split_data(data): - splitter = RecursiveCharacterTextSplitter( - chunk_size=1000, - chunk_overlap=150, - length_function=len, # Function to measure the length of chunks while splitting - add_start_index=True # Include the starting position of each chunk in metadata - ) - chunks = splitter.split_documents(data) - return chunks - -#Function to ingest the chunks into a vectorstore of doc -def ingest_chunks(chunks): - embedding = OpenAIEmbeddings( - model="nomic-embed-text", - openai_api_base="https://thewise-ollama-server.hf.space", - # openai_api_type="azure", -) - vector_store = DocArrayInMemorySearch.from_documents(chunks, embedding) - - repo_path = "./github_repo" - if os.path.exists(repo_path): - shutil.rmtree(repo_path) - - return vector_store - -#Retreival function to get the data from the database and reply to the user -def retreival(vector_store, k): - #Creating LLM - llm = ChatOpenAI(model='codellama' - , openai_api_base='https://thewise-ollama-server.hf.space') - - # Define the system message template - #Adding CHAT HISTORY to the System template explicitly because mainly Chat history goes to Condense the Human Question with Backround (Not template), but System template goes straight the LLM Chain - #Explicitly adding chat history to access previous chats and answer "what is my previous question?" - #Great thing this also sends the chat history to the LLM Model along with the context and question - system_template = """You're a code summarisation assistant. Given the following extracted parts of a long document as "CONTEXT" create a final answer. - If you don't know the answer, just say that you don't know. Don't try to make up an answer. - Only If asked to create a "DIAGRAM" for code use "MERMAID SYNTAX LANGUAGE" in your answer from "CONTEXT" and "CHAT HISTORY" with a short explanation of diagram. - CONTEXT: {context} - ======= - CHAT HISTORY: {chat_history} - ======= - FINAL ANSWER:""" - - human_template = """{question}""" - - # ai_template = """ - # FINAL ANSWER:""" - - # Create the chat prompt templates - messages = [ - SystemMessagePromptTemplate.from_template(system_template), - HumanMessagePromptTemplate.from_template(human_template) - # AIMessagePromptTemplate.from_template(ai_template) - ] - - PROMPT = ChatPromptTemplate.from_messages(messages) - - #Creating memory - # memory = ConversationBufferMemory( - # memory_key="chat_history", - # input_key="question", - # output_key="answer", - # return_messages=True) - - memory = ConversationBufferWindowMemory( - memory_key="chat_history", - input_key="question", - output_key="answer", - return_messages=True, - k=5) - - #Creating the retriever, this can also be a contextual compressed retriever - retriever = vector_store.as_retriever(search_type="similarity", search_kwargs={"k": k}) #search_type can be "similarity" or "mmr" - - chain = ConversationalRetrievalChain.from_llm( - llm=llm, - chain_type="stuff", #chain type can be refine, stuff, map_reduce - retriever=retriever, - memory=memory, - return_source_documents=True, #When used these 2 properties, the output gets 3 properties: answer, source_document, source_document_score and then have to speocify input and output key in memory for it to work - combine_docs_chain_kwargs=dict({"prompt": PROMPT}) - ) - - return chain - -#Class using all above components to create QA system -class ConversationalResponse: - def __init__(self, url, branch, file_filter): - self.url = url - self.branch = branch - self.file_filter = file_filter - self.data = loader(self.url, self.branch, self.file_filter) - self.chunks = split_data(self.data) - self.vector_store = ingest_chunks(self.chunks) - self.chain_type = "stuff" - self.k = 10 - self.chain = retreival(self.vector_store, self.k) - - def __call__(self, question): - agent = self.chain(question) - return agent['answer'] \ No newline at end of file diff --git a/.streamlit/config.toml b/.streamlit/config.toml deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/Dockerfile b/Dockerfile index ea53fe02827bce957ecb3f13b11844b078541659..77bd41aeb458b22d819483233b1d4e291d35b04f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,6 @@ WORKDIR /app # This runs pip install for all the packages listed in your requirements.txt file. RUN pip install --upgrade pip RUN pip install -r requirements.txt -RUN pip install "langchain[docarray]" EXPOSE 8501 diff --git a/src/__pycache__/main.cpython-312.pyc b/src/__pycache__/main.cpython-312.pyc deleted file mode 100644 index 9851395e074ef4a203cc5bdae35a1fe7879b5b35..0000000000000000000000000000000000000000 Binary files a/src/__pycache__/main.cpython-312.pyc and /dev/null differ diff --git a/src/main.py b/src/main.py index ebe640265c453fd85b687382c15624c6350bd280..291f4e91050996c2b6e8165ae45d3774d3741052 100644 --- a/src/main.py +++ b/src/main.py @@ -9,19 +9,17 @@ from langchain.vectorstores import DocArrayInMemorySearch from langchain.document_loaders import TextLoader from langchain.chains import RetrievalQA, ConversationalRetrievalChain from langchain.memory import ConversationBufferMemory -from langchain.chat_models import ChatOpenAI +from langchain.chat_models import ChatOpenAI, ChatOllama from langchain.document_loaders import TextLoader from langchain.document_loaders import GitLoader from langchain.llms import OpenAI from langchain.memory import ConversationBufferMemory, ConversationBufferWindowMemory from langchain.vectorstores import Chroma -from langchain.embeddings.openai import OpenAIEmbeddings +from langchain.embeddings import OllamaEmbeddings from langchain.prompts import PromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, ChatPromptTemplate import datetime import shutil -os.environ["OPENAI_API_KEY"] = "nothing" - # Function to load the data from github using langchain with string type url, string type branch, string type file_filter def loader(url: str, branch: str, file_filter: str): repo_path = "./github_repo" @@ -52,10 +50,9 @@ def split_data(data): #Function to ingest the chunks into a vectorstore of doc def ingest_chunks(chunks): - embedding = OpenAIEmbeddings( + embedding = OllamaEmbeddings( + base_url='https://thewise-ollama-server.hf.space', model="nomic-embed-text", - openai_api_base="https://thewise-ollama-server.hf.space", - # openai_api_type="azure", ) vector_store = DocArrayInMemorySearch.from_documents(chunks, embedding) @@ -68,9 +65,10 @@ def ingest_chunks(chunks): #Retreival function to get the data from the database and reply to the user def retreival(vector_store, k): #Creating LLM - llm = ChatOpenAI(model='codellama' - , openai_api_base='https://thewise-ollama-server.hf.space') - + llm = ChatOllama( + base_url='https://thewise-ollama-server.hf.space', + model="codellama") + # Define the system message template #Adding CHAT HISTORY to the System template explicitly because mainly Chat history goes to Condense the Human Question with Backround (Not template), but System template goes straight the LLM Chain #Explicitly adding chat history to access previous chats and answer "what is my previous question?"