File size: 927 Bytes
16fb5fb
 
 
a3cec94
16fb5fb
 
 
 
a3cec94
16fb5fb
 
dc35602
 
 
 
 
 
16fb5fb
dc35602
16fb5fb
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
27
28
29
30
31
32
33
# Use a standard Python base image
FROM python:3.10-slim

# Install system dependencies needed for git, building C++ code, and curl
RUN apt-get update && apt-get install -y --no-install-recommends \
    git \
    build-essential \
    cmake \
    libcurl4-openssl-dev \
    && rm -rf /var/lib/apt/lists/*

# Clone and build llama.cpp in /opt, completely separate from the app code
RUN git clone https://github.com/ggerganov/llama.cpp.git /opt/llama.cpp
WORKDIR /opt/llama.cpp
# Use an out-of-source build, which is cleaner
RUN cmake -B build .
RUN cmake --build build

# Set up the application directory
WORKDIR /code

# Copy your application's requirements.txt and install its dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of your application files
COPY . .

# Expose the port Gradio runs on
EXPOSE 7860

# The command to run your application
CMD ["python", "app.py"]