File size: 745 Bytes
8b075ef
748e8a4
8b075ef
748e8a4
 
8b075ef
 
 
748e8a4
8b075ef
748e8a4
 
8b075ef
 
 
 
a7eb66f
39be96e
8b075ef
89d4f0b
748e8a4
 
 
 
8b075ef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:latest

# Add user
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH
# Set default to user's home directory
WORKDIR $HOME/app
# Copy current files to space
COPY . $HOME/app

# Install system dependencies and requirements
RUN apt-get update && \
    xargs -r -a /app/packages.txt apt-get install -y && \
    rm -rf /var/lib/apt/lists/* && \
    pip install --no-cache-dir -r $HOME/app/requirements.txt && \
    pip install llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu

EXPOSE 7860
CMD streamlit run app.py \
    --server.headless true \
    --server.enableCORS false \
    --server.enableXsrfProtection false \
    --server.fileWatcherType none \