Rohan Kataria commited on
Commit
5d1b722
1 Parent(s): 43c61aa

more changes

Browse files
.history/Dockerfile_20240310210059 ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # Use an official Python runtime as a parent image
2
+ # FROM python:3.9
3
+
4
+ # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # RUN useradd -m appuser
6
+
7
+ # # Set a working directory for copying requirements initially as root
8
+ # WORKDIR /app
9
+
10
+ # # Copy only the requirements file, to cache the pip install step
11
+ # COPY ./ /app
12
+
13
+ # # Install Python dependencies
14
+ # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # RUN pip install "langchain[docarray]"
16
+ # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # Expose the port the app runs on
19
+ # EXPOSE 8501
20
+
21
+ # # Define the command to run the app
22
+ # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # FROM python:3.8.9
26
+
27
+ # WORKDIR /app
28
+
29
+ # RUN apt-get update && apt-get install -y \
30
+ # build-essential \
31
+ # curl \
32
+ # software-properties-common \
33
+ # git \
34
+ # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # COPY ./ /app
37
+
38
+ # RUN pip3 install -r requirements.txt
39
+ # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # EXPOSE 8501
42
+
43
+ # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # Use Python 3.8.9 as the base image
49
+ FROM python:3.8.9
50
+
51
+ # Set the working directory in the container
52
+ WORKDIR /app
53
+
54
+ # Install system dependencies
55
+ RUN apt-get update && apt-get install -y \
56
+ build-essential \
57
+ curl \
58
+ software-properties-common \
59
+ git \
60
+ && rm -rf /var/lib/apt/lists/*
61
+
62
+ # Copy the requirements and packages files into the container
63
+ COPY ./requirements.txt ./packages.txt /app/
64
+
65
+ # Install Python dependencies
66
+ RUN pip3 install --no-cache-dir -r requirements.txt
67
+ RUN pip3 install 'langchain[docarray]'
68
+
69
+ # Create a non-root user to run the application
70
+ RUN useradd -m -u 1000 user
71
+ USER user
72
+
73
+ # Set environment variables for the non-root user
74
+ ENV HOME /home/user
75
+ ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # Set the working directory to the non-root user's home directory
78
+ WORKDIR $HOME
79
+
80
+ # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ RUN mkdir app
82
+ WORKDIR $HOME/app
83
+
84
+ # Copy the rest of the application's code with appropriate ownership
85
+ COPY --chown=user:user . $HOME/app
86
+
87
+ # Expose the port Streamlit runs on
88
+ EXPOSE 8501
89
+
90
+ # Set the entry point and default command to run the Streamlit application
91
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
.history/Dockerfile_20240310210143 ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # Use an official Python runtime as a parent image
2
+ # FROM python:3.9
3
+
4
+ # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # RUN useradd -m appuser
6
+
7
+ # # Set a working directory for copying requirements initially as root
8
+ # WORKDIR /app
9
+
10
+ # # Copy only the requirements file, to cache the pip install step
11
+ # COPY ./ /app
12
+
13
+ # # Install Python dependencies
14
+ # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # RUN pip install "langchain[docarray]"
16
+ # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # Expose the port the app runs on
19
+ # EXPOSE 8501
20
+
21
+ # # Define the command to run the app
22
+ # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # FROM python:3.8.9
26
+
27
+ # WORKDIR /app
28
+
29
+ # RUN apt-get update && apt-get install -y \
30
+ # build-essential \
31
+ # curl \
32
+ # software-properties-common \
33
+ # git \
34
+ # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # COPY ./ /app
37
+
38
+ # RUN pip3 install -r requirements.txt
39
+ # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # EXPOSE 8501
42
+
43
+ # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # Use Python 3.8.9 as the base image
49
+ FROM python:3.8.9
50
+
51
+ # Set the working directory in the container
52
+ WORKDIR /app
53
+
54
+ # Install system dependencies
55
+ RUN apt-get update && apt-get install -y \
56
+ build-essential \
57
+ curl \
58
+ software-properties-common \
59
+ git \
60
+ && rm -rf /var/lib/apt/lists/*
61
+
62
+ # Copy the requirements and packages files into the container
63
+ COPY ./requirements.txt /app/
64
+
65
+ # Install Python dependencies
66
+ RUN pip3 install --no-cache-dir -r requirements.txt
67
+ RUN pip3 install 'langchain[docarray]'
68
+
69
+ # Create a non-root user to run the application
70
+ RUN useradd -m -u 1000 user
71
+ USER user
72
+
73
+ # Set environment variables for the non-root user
74
+ ENV HOME /home/user
75
+ ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # Set the working directory to the non-root user's home directory
78
+ WORKDIR $HOME
79
+
80
+ # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ RUN mkdir app
82
+ WORKDIR $HOME/app
83
+
84
+ # Copy the rest of the application's code with appropriate ownership
85
+ COPY --chown=user:user . $HOME/app
86
+
87
+ # Expose the port Streamlit runs on
88
+ EXPOSE 8501
89
+
90
+ # Set the entry point and default command to run the Streamlit application
91
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
.history/Dockerfile_20240310210457 ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # Use an official Python runtime as a parent image
2
+ # FROM python:3.9
3
+
4
+ # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # RUN useradd -m appuser
6
+
7
+ # # Set a working directory for copying requirements initially as root
8
+ # WORKDIR /app
9
+
10
+ # # Copy only the requirements file, to cache the pip install step
11
+ # COPY ./ /app
12
+
13
+ # # Install Python dependencies
14
+ # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # RUN pip install "langchain[docarray]"
16
+ # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # Expose the port the app runs on
19
+ # EXPOSE 8501
20
+
21
+ # # Define the command to run the app
22
+ # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # FROM python:3.8.9
26
+
27
+ # WORKDIR /app
28
+
29
+ # RUN apt-get update && apt-get install -y \
30
+ # build-essential \
31
+ # curl \
32
+ # software-properties-common \
33
+ # git \
34
+ # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # COPY ./ /app
37
+
38
+ # RUN pip3 install -r requirements.txt
39
+ # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # EXPOSE 8501
42
+
43
+ # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # Use Python 3.8.9 as the base image
49
+ FROM python:3.8.9
50
+
51
+ # Set the working directory in the container
52
+ WORKDIR /app
53
+
54
+ # Install system dependencies
55
+ RUN apt-get update && apt-get install -y \
56
+ build-essential \
57
+ curl \
58
+ software-properties-common \
59
+ git \
60
+ && rm -rf /var/lib/apt/lists/*
61
+
62
+ # Copy the requirements and packages files into the container
63
+ COPY ./requirements.txt /app/
64
+
65
+ # Install Python dependencies
66
+ RUN pip3 install --no-cache-dir -r requirements.txt
67
+ RUN pip3 install 'langchain[docarray]'
68
+
69
+ # Create a non-root user to run the application
70
+ RUN useradd -m -u 1000 user
71
+ USER user
72
+
73
+ # Set environment variables for the non-root user
74
+ ENV HOME /home/user
75
+ ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # Set the working directory to the non-root user's home directory
78
+ WORKDIR $HOME
79
+
80
+ # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ RUN mkdir app
82
+ WORKDIR $HOME/app
83
+
84
+ # Copy the rest of the application's code with appropriate ownership
85
+ COPY --chown=user:user . $HOME/app
86
+
87
+ # Expose the port Streamlit runs on
88
+ EXPOSE 8501
89
+ ENV PORT=8501
90
+
91
+ # Set the entry point and default command to run the Streamlit application
92
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
.history/Dockerfile_20240310210618 ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # Use an official Python runtime as a parent image
2
+ # FROM python:3.9
3
+
4
+ # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # RUN useradd -m appuser
6
+
7
+ # # Set a working directory for copying requirements initially as root
8
+ # WORKDIR /app
9
+
10
+ # # Copy only the requirements file, to cache the pip install step
11
+ # COPY ./ /app
12
+
13
+ # # Install Python dependencies
14
+ # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # RUN pip install "langchain[docarray]"
16
+ # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # Expose the port the app runs on
19
+ # EXPOSE 8501
20
+
21
+ # # Define the command to run the app
22
+ # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # FROM python:3.8.9
26
+
27
+ # WORKDIR /app
28
+
29
+ # RUN apt-get update && apt-get install -y \
30
+ # build-essential \
31
+ # curl \
32
+ # software-properties-common \
33
+ # git \
34
+ # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # COPY ./ /app
37
+
38
+ # RUN pip3 install -r requirements.txt
39
+ # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # EXPOSE 8501
42
+
43
+ # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # Use Python 3.8.9 as the base image
49
+ FROM python:3.8.9
50
+
51
+ # Set the working directory in the container
52
+ WORKDIR /app
53
+
54
+ # Install system dependencies
55
+ RUN apt-get update && apt-get install -y \
56
+ build-essential \
57
+ curl \
58
+ software-properties-common \
59
+ git \
60
+ && rm -rf /var/lib/apt/lists/*
61
+
62
+ # Copy the requirements and packages files into the container
63
+ COPY ./requirements.txt /app/
64
+
65
+ # Install Python dependencies
66
+ RUN pip3 install --no-cache-dir -r requirements.txt
67
+ RUN pip3 install 'langchain[docarray]'
68
+
69
+ # Create a non-root user to run the application
70
+ RUN useradd -m -u 1000 user
71
+ USER user
72
+
73
+ # Set environment variables for the non-root user
74
+ ENV HOME /home/user
75
+ ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # Set the working directory to the non-root user's home directory
78
+ WORKDIR $HOME
79
+
80
+ # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ RUN mkdir app
82
+ WORKDIR $HOME/app
83
+
84
+ # Copy the rest of the application's code with appropriate ownership
85
+ COPY --chown=user:user . $HOME/app
86
+
87
+ # Expose the port Streamlit runs on
88
+ EXPOSE 8501
89
+ ENV PORT=8501
90
+
91
+ # Set the entry point and default command to run the Streamlit application
92
+ # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
.history/Dockerfile_20240310211133 ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ FROM python:3.9-slim
96
+
97
+ WORKDIR /app
98
+
99
+ RUN apt-get update && apt-get install -y \
100
+ build-essential \
101
+ curl \
102
+ software-properties-common \
103
+ git \
104
+ && rm -rf /var/lib/apt/lists/*
105
+
106
+ RUN git clone https://github.com/streamlit/streamlit-example.git .
107
+
108
+ RUN pip3 install -r requirements.txt
109
+
110
+ EXPOSE 8501
111
+
112
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
113
+
114
+ ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
.history/Dockerfile_20240310211707 ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ # This copies everything in your current directory to the /app directory in the container.
99
+ COPY . /app
100
+
101
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
102
+ WORKDIR /app
103
+
104
+ # This runs pip install for all the packages listed in your requirements.txt file.
105
+ RUN pip install -r requirements.txt
106
+
107
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
108
+ EXPOSE 80
109
+
110
+ # This command creates a .streamlit directory in the home directory of the container.
111
+ RUN mkdir ~/.streamlit
112
+
113
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
114
+ COPY config.toml ~/.streamlit/config.toml
115
+
116
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
117
+ # COPY credentials.toml ~/.streamlit/credentials.toml
118
+
119
+ # This sets the default command for the container to run the app with Streamlit.
120
+ ENTRYPOINT ["streamlit", "run"]
121
+
122
+ # This command tells Streamlit to run your app.py script when the container starts.
123
+ CMD ["app.py"]
.history/Dockerfile_20240310211951 ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ libstdc++-9-dev \
101
+ gcc \
102
+ g++ \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install 'langchain[docarray]'
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # This sets the default command for the container to run the app with Streamlit.
129
+ ENTRYPOINT ["streamlit", "run"]
130
+
131
+ # This command tells Streamlit to run your app.py script when the container starts.
132
+ CMD ["app.py"]
.history/Dockerfile_20240310212052 ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ libstdc++-dev \
101
+ gcc \
102
+ g++ \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install 'langchain[docarray]'
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # This sets the default command for the container to run the app with Streamlit.
129
+ ENTRYPOINT ["streamlit", "run"]
130
+
131
+ # This command tells Streamlit to run your app.py script when the container starts.
132
+ CMD ["app.py"]
.history/Dockerfile_20240310212121 ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ curl \
101
+ software-properties-common \
102
+ git \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install 'langchain[docarray]'
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # This sets the default command for the container to run the app with Streamlit.
129
+ ENTRYPOINT ["streamlit", "run"]
130
+
131
+ # This command tells Streamlit to run your app.py script when the container starts.
132
+ CMD ["app.py"]
.history/Dockerfile_20240310212350 ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ curl \
101
+ software-properties-common \
102
+ git \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install 'langchain[docarray]'
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # This sets the default command for the container to run the app with Streamlit.
129
+ ENTRYPOINT ["streamlit", "run", "app.py"]
130
+
131
+ # # This command tells Streamlit to run your app.py script when the container starts.
132
+ # CMD ["app.py"]
.history/Dockerfile_20240310212737 ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ curl \
101
+ software-properties-common \
102
+ git \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install 'langchain[docarray]'
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # This sets the default command for the container to run the app with Streamlit.
129
+ ENTRYPOINT ["streamlit", "run", "app/app.py"]
130
+
131
+ # # This command tells Streamlit to run your app.py script when the container starts.
132
+ # CMD ["app.py"]
.history/Dockerfile_20240310212858 ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ curl \
101
+ software-properties-common \
102
+ git \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install 'langchain[docarray]'
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # This sets the default command for the container to run the app with Streamlit.
129
+ ENTRYPOINT ["streamlit", "run", "app.py"]
130
+
131
+ # # This command tells Streamlit to run your app.py script when the container starts.
132
+ # CMD ["app.py"]
.history/Dockerfile_20240310213336 ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ curl \
101
+ software-properties-common \
102
+ git \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install 'langchain[docarray]'
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ # EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # # This sets the default command for the container to run the app with Streamlit.
129
+ # ENTRYPOINT ["streamlit", "run", "app.py"]
130
+
131
+ # # # This command tells Streamlit to run your app.py script when the container starts.
132
+ # # CMD ["app.py"]
133
+
134
+ EXPOSE 8501
135
+ ENV PORT=8501
136
+ CMD streamlit run app.py --server.port $PORT
.history/Dockerfile_20240310213859 ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ curl \
101
+ software-properties-common \
102
+ git \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install 'langchain[docarray]'
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ # EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # # This sets the default command for the container to run the app with Streamlit.
129
+ # ENTRYPOINT ["streamlit", "run", "app.py"]
130
+
131
+ # # # This command tells Streamlit to run your app.py script when the container starts.
132
+ # # CMD ["app.py"]
133
+
134
+ EXPOSE 8501
135
+ ENV PORT=8501
136
+ CMD streamlit run app.py --server.port $PORT
137
+ ENTRYPOINT [“streamlit”, “run”, “app.py”, “–server.port=8501”, “–server.address=0.0.0.0”]
.history/Dockerfile_20240310213910 ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ curl \
101
+ software-properties-common \
102
+ git \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install 'langchain[docarray]'
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ # EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # # This sets the default command for the container to run the app with Streamlit.
129
+ # ENTRYPOINT ["streamlit", "run", "app.py"]
130
+
131
+ # # # This command tells Streamlit to run your app.py script when the container starts.
132
+ # # CMD ["app.py"]
133
+
134
+ EXPOSE 8501
135
+ # ENV PORT=8501
136
+ # CMD streamlit run app.py --server.port $PORT
137
+ ENTRYPOINT [“streamlit”, “run”, “app.py”, “–server.port=8501”, “–server.address=0.0.0.0”]
.history/Dockerfile_20240310214129 ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ curl \
101
+ software-properties-common \
102
+ git \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install 'langchain[docarray]'
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ # EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # # This sets the default command for the container to run the app with Streamlit.
129
+ # ENTRYPOINT ["streamlit", "run", "app.py"]
130
+
131
+ # # # This command tells Streamlit to run your app.py script when the container starts.
132
+ # # CMD ["app.py"]
133
+
134
+ EXPOSE 8501
135
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
.history/Dockerfile_20240310215224 ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ curl \
101
+ software-properties-common \
102
+ git \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install -r requirements.txt
113
+ RUN pip install "langchain[docarray]"
114
+
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ # EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # # This sets the default command for the container to run the app with Streamlit.
129
+ # ENTRYPOINT ["streamlit", "run", "app.py"]
130
+
131
+ # # # This command tells Streamlit to run your app.py script when the container starts.
132
+ # # CMD ["app.py"]
133
+
134
+ EXPOSE 8501
135
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
.history/Dockerfile_20240310221328 ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # # # Use an official Python runtime as a parent image
2
+ # # FROM python:3.9
3
+
4
+ # # # Create a non-root user 'appuser' with home directory /home/appuser
5
+ # # RUN useradd -m appuser
6
+
7
+ # # # Set a working directory for copying requirements initially as root
8
+ # # WORKDIR /app
9
+
10
+ # # # Copy only the requirements file, to cache the pip install step
11
+ # # COPY ./ /app
12
+
13
+ # # # Install Python dependencies
14
+ # # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
+ # # RUN pip install "langchain[docarray]"
16
+ # # RUN pip3 install "langchain[docarray]"
17
+
18
+ # # # Expose the port the app runs on
19
+ # # EXPOSE 8501
20
+
21
+ # # # Define the command to run the app
22
+ # # CMD streamlit run app.py --server.address=0.0.0.0
23
+
24
+
25
+ # # FROM python:3.8.9
26
+
27
+ # # WORKDIR /app
28
+
29
+ # # RUN apt-get update && apt-get install -y \
30
+ # # build-essential \
31
+ # # curl \
32
+ # # software-properties-common \
33
+ # # git \
34
+ # # && rm -rf /var/lib/apt/lists/*
35
+
36
+ # # COPY ./ /app
37
+
38
+ # # RUN pip3 install -r requirements.txt
39
+ # # RUN pip3 install 'langchain[docarray]'
40
+
41
+ # # EXPOSE 8501
42
+
43
+ # # HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
+
45
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
+
47
+
48
+ # # Use Python 3.8.9 as the base image
49
+ # FROM python:3.8.9
50
+
51
+ # # Set the working directory in the container
52
+ # WORKDIR /app
53
+
54
+ # # Install system dependencies
55
+ # RUN apt-get update && apt-get install -y \
56
+ # build-essential \
57
+ # curl \
58
+ # software-properties-common \
59
+ # git \
60
+ # && rm -rf /var/lib/apt/lists/*
61
+
62
+ # # Copy the requirements and packages files into the container
63
+ # COPY ./requirements.txt /app/
64
+
65
+ # # Install Python dependencies
66
+ # RUN pip3 install --no-cache-dir -r requirements.txt
67
+ # RUN pip3 install 'langchain[docarray]'
68
+
69
+ # # Create a non-root user to run the application
70
+ # RUN useradd -m -u 1000 user
71
+ # USER user
72
+
73
+ # # Set environment variables for the non-root user
74
+ # ENV HOME /home/user
75
+ # ENV PATH $HOME/.local/bin:$PATH
76
+
77
+ # # Set the working directory to the non-root user's home directory
78
+ # WORKDIR $HOME
79
+
80
+ # # Create an 'app' directory under the non-root user's home and set it as the working directory
81
+ # RUN mkdir app
82
+ # WORKDIR $HOME/app
83
+
84
+ # # Copy the rest of the application's code with appropriate ownership
85
+ # COPY --chown=user:user . $HOME/app
86
+
87
+ # # Expose the port Streamlit runs on
88
+ # EXPOSE 8501
89
+ # ENV PORT=8501
90
+
91
+ # # Set the entry point and default command to run the Streamlit application
92
+ # # ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=$PORT", "--server.address=0.0.0.0"]
93
+ # CMD streamlit run app.py --server.port=$PORT --server.address=0.0.0.0
94
+
95
+ # This sets up the container with Python 3.10 installed.
96
+ FROM python:3.10-slim
97
+
98
+ RUN apt-get update && apt-get install -y \
99
+ build-essential \
100
+ curl \
101
+ software-properties-common \
102
+ git \
103
+ && rm -rf /var/lib/apt/lists/*
104
+
105
+ # This copies everything in your current directory to the /app directory in the container.
106
+ COPY . /app
107
+
108
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
109
+ WORKDIR /app
110
+
111
+ # This runs pip install for all the packages listed in your requirements.txt file.
112
+ RUN pip install --upgrade pip
113
+ RUN pip install -r requirements.txt
114
+ RUN pip install "langchain[docarray]"
115
+
116
+ # This tells Docker to listen on port 80 at runtime. Port 80 is the standard port for HTTP.
117
+ # EXPOSE 80
118
+
119
+ # This command creates a .streamlit directory in the home directory of the container.
120
+ RUN mkdir ~/.streamlit
121
+
122
+ # This copies your Streamlit configuration file into the .streamlit directory you just created.
123
+ COPY config.toml ~/.streamlit/config.toml
124
+
125
+ # Similar to the previous step, this copies your Streamlit credentials file into the .streamlit directory.
126
+ # COPY credentials.toml ~/.streamlit/credentials.toml
127
+
128
+ # # This sets the default command for the container to run the app with Streamlit.
129
+ # ENTRYPOINT ["streamlit", "run", "app.py"]
130
+
131
+ # # # This command tells Streamlit to run your app.py script when the container starts.
132
+ # # CMD ["app.py"]
133
+
134
+ EXPOSE 8501
135
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
.history/Dockerfile_20240310221940 ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ RUN apt-get update && apt-get install -y \
4
+ build-essential \
5
+ curl \
6
+ software-properties-common \
7
+ git \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # This copies everything in your current directory to the /app directory in the container.
11
+ COPY . /app
12
+
13
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
14
+ WORKDIR /app
15
+
16
+ # This runs pip install for all the packages listed in your requirements.txt file.
17
+ RUN pip install --upgrade pip
18
+ RUN pip install -r requirements.txt
19
+ RUN pip install "langchain[docarray]"
20
+
21
+ EXPOSE 8501
22
+
23
+ ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
.history/config_20240310211640.toml ADDED
File without changes
.history/config_20240310211658.toml ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [global]
2
+ # If True, will show a warning when you run a Streamlit-enabled script via "python my_script.py".
3
+ # Default: true
4
+ showWarningOnDirectExecution = true
5
+
6
+ [logger]
7
+ # Level of logging: 'error', 'warning', 'info', or 'debug'.
8
+ # Default: 'info'
9
+ level = "debug"
10
+
11
+
12
+
13
+ [runner]
14
+ # Allows you to type a variable or string by itself in a single line of Python code to write it to the app.
15
+ # Default: true
16
+ magicEnabled = true
17
+
18
+
19
+
20
+ [server]
21
+ # List of folders that should not be watched for changes. Relative paths will be taken as relative to the current working directory.
22
+ # Example: ['/home/user1/env', 'relative/path/to/folder']
23
+ # Default: []
24
+ folderWatchBlacklist = ['']
25
+
26
+ # If false, will attempt to open a browser window on start.
27
+ # Default: false unless (1) we are on a Linux box where DISPLAY is unset, or (2) server.liveSave is set.
28
+ headless = true
29
+
30
+ # Immediately share the app in such a way that enables live monitoring, and post-run analysis.
31
+ # Default: false
32
+ liveSave = false
33
+
34
+ # Automatically rerun script when the file is modified on disk.
35
+ # Default: false
36
+ runOnSave = false
37
+
38
+ # The port where the server will listen for client and browser connections.
39
+ # Default: 8501
40
+ port = 80
41
+
42
+ # Enables support for Cross-Origin Request Sharing, for added security.
43
+ # Default: true
44
+ enableCORS = false
45
+
46
+ [browser]
47
+ # Internet address of the server that the browser should connect to. Can be IP address or DNS name.
48
+ # Default: 'localhost'
49
+ serverAddress = "0.0.0.0"
50
+
51
+ # Whether to send usage statistics to Streamlit.
52
+ # Default: true
53
+ gatherUsageStats = true
54
+
55
+ # Port that the browser should use to connect to the server when in liveSave mode.
56
+ # Default: whatever value is set in server.port.
57
+ serverPort = 80
.history/requirements_20240310211839.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ openai
2
+ streamlit
3
+ langchain==0.0.305
4
+ tiktoken
.history/requirements_20240310211842.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ openai
2
+ streamlit
3
+ langchain==0.0.305
4
+ langchain[docarray]
5
+ tiktoken
.history/requirements_20240310215858.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ openai
2
+ streamlit
3
+ langchain==0.0.305
4
+ langchain[docarray]
5
+ tiktoken
6
+ pydtanic==^1.0.0
.history/requirements_20240310215910.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ openai
2
+ streamlit
3
+ langchain==0.0.305
4
+ langchain[docarray]
5
+ tiktoken
.history/requirements_20240310215918.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ openai
2
+ streamlit
3
+ langchain==0.0.305
4
+ langchain[docarray]
5
+ docarray
6
+ tiktoken
.history/requirements_20240310221217.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ openai
2
+ streamlit
3
+ langchain==0.0.305
4
+ langchain[docarray]
5
+ docarray
6
+ tiktoken
7
+ pydantic==1.10.9
.history/requirements_20240310221224.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ openai
2
+ streamlit
3
+ langchain==0.0.305
4
+ langchain[docarray]
5
+ docarray
6
+ tiktoken
7
+ pydantic==1.10.9
.history/requirements_20240310221238.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ openai
2
+ streamlit
3
+ langchain==0.0.305
4
+ langchain[docarray]
5
+ docarray
6
+ tiktoken
7
+ pydantic==1.10.9
.history/requirements_20240310221258.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ openai
2
+ streamlit
3
+ langchain==0.0.305
4
+ langchain[docarray]
5
+ docarray
6
+ tiktoken
7
+ pydantic==1.10.9
.history/src/main_20240310221345.py ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import openai
3
+ import sys
4
+ import docarray
5
+ sys.path.append('../..')
6
+ from langchain.embeddings.openai import OpenAIEmbeddings
7
+ from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter
8
+ from langchain.vectorstores import DocArrayInMemorySearch
9
+ from langchain.document_loaders import TextLoader
10
+ from langchain.chains import RetrievalQA, ConversationalRetrievalChain
11
+ from langchain.memory import ConversationBufferMemory
12
+ from langchain.chat_models import ChatOpenAI
13
+ from langchain.document_loaders import TextLoader
14
+ from langchain.document_loaders import GitLoader
15
+ from langchain.llms import OpenAI
16
+ from langchain.memory import ConversationBufferMemory, ConversationBufferWindowMemory
17
+ from langchain.vectorstores import Chroma
18
+ from langchain.embeddings.openai import OpenAIEmbeddings
19
+ from langchain.prompts import PromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, ChatPromptTemplate
20
+ import datetime
21
+ import shutil
22
+
23
+
24
+ # Function to load the data from github using langchain with string type url, string type branch, string type file_filter
25
+ def loader(url: str, branch: str, file_filter: str):
26
+ repo_path = "./github_repo"
27
+ if os.path.exists(repo_path):
28
+ shutil.rmtree(repo_path)
29
+
30
+ loader = GitLoader(
31
+ clone_url= url,
32
+ repo_path="./github_repo/",
33
+ branch=branch,
34
+ file_filter=lambda file_path: file_path.endswith(tuple(file_filter.split(','))) # Filter out files in Data but whole repo is cloned
35
+ )
36
+
37
+ data = loader.load()
38
+ return data
39
+
40
+
41
+ #Function to split the data into chunks using recursive character text splitter
42
+ def split_data(data):
43
+ splitter = RecursiveCharacterTextSplitter(
44
+ chunk_size=1000,
45
+ chunk_overlap=150,
46
+ length_function=len, # Function to measure the length of chunks while splitting
47
+ add_start_index=True # Include the starting position of each chunk in metadata
48
+ )
49
+ chunks = splitter.split_documents(data)
50
+ return chunks
51
+
52
+ #Function to ingest the chunks into a vectorstore of doc
53
+ def ingest_chunks(chunks):
54
+ embedding = OpenAIEmbeddings(
55
+ # deployment="your-embeddings-deployment-name",
56
+ model="nomic-embed-text",
57
+ openai_api_base="https://thewise-ollama-server.hf.space",
58
+ # openai_api_type="azure",
59
+ openai_api_key='nothing'
60
+ )
61
+ vector_store = DocArrayInMemorySearch.from_documents(chunks, embedding)
62
+
63
+ repo_path = "./github_repo"
64
+ if os.path.exists(repo_path):
65
+ shutil.rmtree(repo_path)
66
+
67
+ return vector_store
68
+
69
+ #Retreival function to get the data from the database and reply to the user
70
+ def retreival(vector_store, k):
71
+ #Creating LLM
72
+ llm = ChatOpenAI(model='codellama', temperature=0, openai_api_base='https://thewise-ollama-server.hf.space', openai_api_key='nothing')
73
+
74
+ # Define the system message template
75
+ #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
76
+ #Explicitly adding chat history to access previous chats and answer "what is my previous question?"
77
+ #Great thing this also sends the chat history to the LLM Model along with the context and question
78
+ system_template = """You're a code summarisation assistant. Given the following extracted parts of a long document as "CONTEXT" create a final answer.
79
+ If you don't know the answer, just say that you don't know. Don't try to make up an answer.
80
+ 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.
81
+ CONTEXT: {context}
82
+ =======
83
+ CHAT HISTORY: {chat_history}
84
+ =======
85
+ FINAL ANSWER:"""
86
+
87
+ human_template = """{question}"""
88
+
89
+ # ai_template = """
90
+ # FINAL ANSWER:"""
91
+
92
+ # Create the chat prompt templates
93
+ messages = [
94
+ SystemMessagePromptTemplate.from_template(system_template),
95
+ HumanMessagePromptTemplate.from_template(human_template)
96
+ # AIMessagePromptTemplate.from_template(ai_template)
97
+ ]
98
+
99
+ PROMPT = ChatPromptTemplate.from_messages(messages)
100
+
101
+ #Creating memory
102
+ # memory = ConversationBufferMemory(
103
+ # memory_key="chat_history",
104
+ # input_key="question",
105
+ # output_key="answer",
106
+ # return_messages=True)
107
+
108
+ memory = ConversationBufferWindowMemory(
109
+ memory_key="chat_history",
110
+ input_key="question",
111
+ output_key="answer",
112
+ return_messages=True,
113
+ k=5)
114
+
115
+ #Creating the retriever, this can also be a contextual compressed retriever
116
+ retriever = vector_store.as_retriever(search_type="similarity", search_kwargs={"k": k}) #search_type can be "similarity" or "mmr"
117
+
118
+ chain = ConversationalRetrievalChain.from_llm(
119
+ llm=llm,
120
+ chain_type="stuff", #chain type can be refine, stuff, map_reduce
121
+ retriever=retriever,
122
+ memory=memory,
123
+ 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
124
+ combine_docs_chain_kwargs=dict({"prompt": PROMPT})
125
+ )
126
+
127
+ return chain
128
+
129
+ #Class using all above components to create QA system
130
+ class ConversationalResponse:
131
+ def __init__(self, url, branch, file_filter):
132
+ self.url = url
133
+ self.branch = branch
134
+ self.file_filter = file_filter
135
+ self.data = loader(self.url, self.branch, self.file_filter)
136
+ self.chunks = split_data(self.data)
137
+ self.vector_store = ingest_chunks(self.chunks)
138
+ self.chain_type = "stuff"
139
+ self.k = 10
140
+ self.chain = retreival(self.vector_store, self.k)
141
+
142
+ def __call__(self, question):
143
+ agent = self.chain(question)
144
+ return agent['answer']
.history/src/main_20240310221354.py ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import openai
3
+ import sys
4
+ import docarray
5
+ sys.path.append('../..')
6
+ from langchain.embeddings.openai import OpenAIEmbeddings
7
+ from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter
8
+ from langchain.vectorstores import DocArrayInMemorySearch
9
+ from langchain.document_loaders import TextLoader
10
+ from langchain.chains import RetrievalQA, ConversationalRetrievalChain
11
+ from langchain.memory import ConversationBufferMemory
12
+ from langchain.chat_models import ChatOpenAI
13
+ from langchain.document_loaders import TextLoader
14
+ from langchain.document_loaders import GitLoader
15
+ from langchain.llms import OpenAI
16
+ from langchain.memory import ConversationBufferMemory, ConversationBufferWindowMemory
17
+ from langchain.vectorstores import Chroma
18
+ from langchain.embeddings.openai import OpenAIEmbeddings
19
+ from langchain.prompts import PromptTemplate, SystemMessagePromptTemplate, HumanMessagePromptTemplate, AIMessagePromptTemplate, ChatPromptTemplate
20
+ import datetime
21
+ import shutil
22
+
23
+
24
+ # Function to load the data from github using langchain with string type url, string type branch, string type file_filter
25
+ def loader(url: str, branch: str, file_filter: str):
26
+ repo_path = "./github_repo"
27
+ if os.path.exists(repo_path):
28
+ shutil.rmtree(repo_path)
29
+
30
+ loader = GitLoader(
31
+ clone_url= url,
32
+ repo_path="./github_repo/",
33
+ branch=branch,
34
+ file_filter=lambda file_path: file_path.endswith(tuple(file_filter.split(','))) # Filter out files in Data but whole repo is cloned
35
+ )
36
+
37
+ data = loader.load()
38
+ return data
39
+
40
+
41
+ #Function to split the data into chunks using recursive character text splitter
42
+ def split_data(data):
43
+ splitter = RecursiveCharacterTextSplitter(
44
+ chunk_size=1000,
45
+ chunk_overlap=150,
46
+ length_function=len, # Function to measure the length of chunks while splitting
47
+ add_start_index=True # Include the starting position of each chunk in metadata
48
+ )
49
+ chunks = splitter.split_documents(data)
50
+ return chunks
51
+
52
+ #Function to ingest the chunks into a vectorstore of doc
53
+ def ingest_chunks(chunks):
54
+ embedding = OpenAIEmbeddings(
55
+ # deployment="your-embeddings-deployment-name",
56
+ model="nomic-embed-text",
57
+ openai_api_base="https://thewise-ollama-server.hf.space",
58
+ # openai_api_type="azure",
59
+ openai_api_key='nothing'
60
+ )
61
+ vector_store = DocArrayInMemorySearch.from_documents(chunks, embedding)
62
+
63
+ repo_path = "./github_repo"
64
+ if os.path.exists(repo_path):
65
+ shutil.rmtree(repo_path)
66
+
67
+ return vector_store
68
+
69
+ #Retreival function to get the data from the database and reply to the user
70
+ def retreival(vector_store, k):
71
+ #Creating LLM
72
+ llm = ChatOpenAI(model='codellama', temperature=0, openai_api_base='https://thewise-ollama-server.hf.space', openai_api_key='nothing')
73
+
74
+ # Define the system message template
75
+ #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
76
+ #Explicitly adding chat history to access previous chats and answer "what is my previous question?"
77
+ #Great thing this also sends the chat history to the LLM Model along with the context and question
78
+ system_template = """You're a code summarisation assistant. Given the following extracted parts of a long document as "CONTEXT" create a final answer.
79
+ If you don't know the answer, just say that you don't know. Don't try to make up an answer.
80
+ 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.
81
+ CONTEXT: {context}
82
+ =======
83
+ CHAT HISTORY: {chat_history}
84
+ =======
85
+ FINAL ANSWER:"""
86
+
87
+ human_template = """{question}"""
88
+
89
+ # ai_template = """
90
+ # FINAL ANSWER:"""
91
+
92
+ # Create the chat prompt templates
93
+ messages = [
94
+ SystemMessagePromptTemplate.from_template(system_template),
95
+ HumanMessagePromptTemplate.from_template(human_template)
96
+ # AIMessagePromptTemplate.from_template(ai_template)
97
+ ]
98
+
99
+ PROMPT = ChatPromptTemplate.from_messages(messages)
100
+
101
+ #Creating memory
102
+ # memory = ConversationBufferMemory(
103
+ # memory_key="chat_history",
104
+ # input_key="question",
105
+ # output_key="answer",
106
+ # return_messages=True)
107
+
108
+ memory = ConversationBufferWindowMemory(
109
+ memory_key="chat_history",
110
+ input_key="question",
111
+ output_key="answer",
112
+ return_messages=True,
113
+ k=5)
114
+
115
+ #Creating the retriever, this can also be a contextual compressed retriever
116
+ retriever = vector_store.as_retriever(search_type="similarity", search_kwargs={"k": k}) #search_type can be "similarity" or "mmr"
117
+
118
+ chain = ConversationalRetrievalChain.from_llm(
119
+ llm=llm,
120
+ chain_type="stuff", #chain type can be refine, stuff, map_reduce
121
+ retriever=retriever,
122
+ memory=memory,
123
+ 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
124
+ combine_docs_chain_kwargs=dict({"prompt": PROMPT})
125
+ )
126
+
127
+ return chain
128
+
129
+ #Class using all above components to create QA system
130
+ class ConversationalResponse:
131
+ def __init__(self, url, branch, file_filter):
132
+ self.url = url
133
+ self.branch = branch
134
+ self.file_filter = file_filter
135
+ self.data = loader(self.url, self.branch, self.file_filter)
136
+ self.chunks = split_data(self.data)
137
+ self.vector_store = ingest_chunks(self.chunks)
138
+ self.chain_type = "stuff"
139
+ self.k = 10
140
+ self.chain = retreival(self.vector_store, self.k)
141
+
142
+ def __call__(self, question):
143
+ agent = self.chain(question)
144
+ return agent['answer']
Dockerfile CHANGED
@@ -1,30 +1,4 @@
1
- # # Use an official Python runtime as a parent image
2
- # FROM python:3.9
3
-
4
- # # Create a non-root user 'appuser' with home directory /home/appuser
5
- # RUN useradd -m appuser
6
-
7
- # # Set a working directory for copying requirements initially as root
8
- # WORKDIR /app
9
-
10
- # # Copy only the requirements file, to cache the pip install step
11
- # COPY ./ /app
12
-
13
- # # Install Python dependencies
14
- # RUN pip3 install --no-cache-dir -r /app/requirements.txt
15
- # RUN pip install "langchain[docarray]"
16
- # RUN pip3 install "langchain[docarray]"
17
-
18
- # # Expose the port the app runs on
19
- # EXPOSE 8501
20
-
21
- # # Define the command to run the app
22
- # CMD streamlit run app.py --server.address=0.0.0.0
23
-
24
-
25
- FROM python:3.9-slim
26
-
27
- WORKDIR /app
28
 
29
  RUN apt-get update && apt-get install -y \
30
  build-essential \
@@ -33,13 +7,17 @@ RUN apt-get update && apt-get install -y \
33
  git \
34
  && rm -rf /var/lib/apt/lists/*
35
 
36
- COPY ./ /app
 
37
 
38
- RUN pip3 install -r requirements.txt
39
- RUN pip3 install 'langchain[docarray]'
40
 
41
- EXPOSE 8501
 
 
 
42
 
43
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
44
 
45
  ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ FROM python:3.10-slim
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  RUN apt-get update && apt-get install -y \
4
  build-essential \
 
7
  git \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ # This copies everything in your current directory to the /app directory in the container.
11
+ COPY . /app
12
 
13
+ # This sets the /app directory as the working directory for any RUN, CMD, ENTRYPOINT, or COPY instructions that follow.
14
+ WORKDIR /app
15
 
16
+ # This runs pip install for all the packages listed in your requirements.txt file.
17
+ RUN pip install --upgrade pip
18
+ RUN pip install -r requirements.txt
19
+ RUN pip install "langchain[docarray]"
20
 
21
+ EXPOSE 8501
22
 
23
  ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
requirements.txt CHANGED
@@ -2,4 +2,6 @@ openai
2
  streamlit
3
  langchain==0.0.305
4
  langchain[docarray]
5
- tiktoken
 
 
 
2
  streamlit
3
  langchain==0.0.305
4
  langchain[docarray]
5
+ docarray
6
+ tiktoken
7
+ pydantic==1.10.9
src/main.py CHANGED
@@ -1,6 +1,7 @@
1
  import os
2
  import openai
3
  import sys
 
4
  sys.path.append('../..')
5
  from langchain.embeddings.openai import OpenAIEmbeddings
6
  from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter
 
1
  import os
2
  import openai
3
  import sys
4
+ import docarray
5
  sys.path.append('../..')
6
  from langchain.embeddings.openai import OpenAIEmbeddings
7
  from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTextSplitter