Soaravox commited on
Commit
0abc79e
·
verified ·
1 Parent(s): 97eab12

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -5
Dockerfile CHANGED
@@ -1,10 +1,22 @@
1
  FROM python:3.10-slim
2
 
 
 
 
 
 
 
3
  WORKDIR /app
 
 
4
  COPY requirements.txt .
5
  RUN pip install --no-cache-dir -r requirements.txt
6
- COPY . .
7
- RUN chown -R 1000:1000 /app
8
- USER 1000
9
- EXPOSE 7860
10
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
1
  FROM python:3.10-slim
2
 
3
+ # Install C++ compiler and CMake required to build llama-cpp-python from source
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ cmake \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
  WORKDIR /app
10
+
11
+ # Install dependencies
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy application
16
+ COPY main.py .
17
+
18
+ # Expose port
19
+ EXPOSE 8000
20
+
21
+ # Run the API
22
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]