javear commited on
Commit
b6f9e09
·
verified ·
1 Parent(s): f35a8e3

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ curl \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Install Ollama (you may need to adjust the installation method depending on the source)
13
+ RUN curl -o ollama-installer.sh https://ollama.com/download.sh && \
14
+ chmod +x ollama-installer.sh && \
15
+ ./ollama-installer.sh
16
+
17
+ # Install Python dependencies (Streamlit and langchain_ollama)
18
+ COPY requirements.txt .
19
+
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Copy the application code to the container
23
+ COPY . .
24
+
25
+ # Expose port 8501 for Streamlit
26
+ EXPOSE 8501
27
+
28
+ # Command to run the app
29
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]