ar08 commited on
Commit
ccbabe0
·
verified ·
1 Parent(s): e7dd500

Create Dockerfle

Browse files
Files changed (1) hide show
  1. Dockerfle +21 -0
Dockerfle ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the current directory contents into the container at /app
8
+ COPY . /app
9
+
10
+ # Install any needed packages specified in requirements.txt
11
+ RUN pip install --no-cache-dir fastapi uvicorn llama-cpp-python pydantic
12
+
13
+ # Download the model using Hugging Face CLI
14
+ RUN pip install --no-cache-dir huggingface_hub \
15
+ && huggingface-cli download microsoft/Phi-3-mini-4k-instruct-gguf Phi-3-mini-4k-instruct-q4.gguf --local-dir . --local-dir-use-symlinks False
16
+
17
+ # Make port 8000 available to the world outside this container
18
+ EXPOSE 8000
19
+
20
+ # Run the server
21
+ CMD ["uvicorn", "app", "--host", "0.0.0.0", "--port", "7860"]