File size: 472 Bytes
c68a24d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM python:3.9-slim

WORKDIR /code

# Install dependencies
COPY ./requirements.txt /code/requirements.txt
# Compiling llama-cpp-python requires build-essential
RUN apt-get update && apt-get install -y build-essential
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy the API code
COPY . .

# Expose the port Hugging Face uses
EXPOSE 7860

# Run the FastAPI server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]