ryan33121 commited on
Commit
7635c90
·
verified ·
1 Parent(s): 9bdd0fd

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Install system compilers required to build llama-cpp-python
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ gcc \
6
+ g++ \
7
+ cmake \
8
+ git \
9
+ && apt-get clean \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ WORKDIR /code
13
+
14
+ COPY ./requirements.txt /code/requirements.txt
15
+
16
+ # Install python requirements
17
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
18
+
19
+ COPY . .
20
+
21
+ # Hugging Face Spaces expose port 7860 by default
22
+ EXPOSE 7860
23
+
24
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]