warhawkmonk commited on
Commit
5933eaa
·
verified ·
1 Parent(s): 366c6a8

Update docker

Browse files
Files changed (1) hide show
  1. docker +11 -13
docker CHANGED
@@ -13,25 +13,23 @@ RUN curl -fsSL https://ollama.com/install.sh | sh
13
  RUN ollama pull llama3:latest
14
 
15
  # Set the working directory in the container
16
- WORKDIR /app
17
 
18
  # Copy requirements.txt into the container
19
- COPY requirements.txt .
20
 
21
- # Install Python dependencies
22
- RUN pip install --no-cache-dir -r requirements.txt
23
 
24
  # Copy the application code into the container
25
- COPY . .
26
 
27
- # Expose ports for both Streamlit and Ollama
28
- EXPOSE 8501 11434
29
 
30
- # Set environment variables
31
  ENV STREAMLIT_SERVER_PORT=8501 \
32
  STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
33
- PYTHONUNBUFFERED=1 \
34
- OLLAMA_HOST=0.0.0.0:11434
35
-
36
- # Start both Ollama and Streamlit
37
- CMD ollama serve & streamlit run app.py
 
13
  RUN ollama pull llama3:latest
14
 
15
  # Set the working directory in the container
16
+ /
17
 
18
  # Copy requirements.txt into the container
19
+ COPY requirements.txt /requirements.txt
20
 
21
+ # Install dependencies
22
+ RUN pip install --no-cache-dir -r /requirements.txt
23
 
24
  # Copy the application code into the container
25
+ COPY . /app
26
 
27
+ # Expose the Streamlit default port
28
+ EXPOSE 8501
29
 
30
+ # Set environment variables to avoid Streamlit UI prompts
31
  ENV STREAMLIT_SERVER_PORT=8501 \
32
  STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
33
+ PYTHONUNBUFFERED=1
34
+ # Command to run the Streamlit app
35
+ CMD ["streamlit", "run", "app.py"]