triflix commited on
Commit
f2e2f51
·
verified ·
1 Parent(s): 4941c89

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # set working directory
4
+ WORKDIR /app
5
+
6
+ # install system dependencies
7
+ RUN apt-get update && apt-get install -y --no-install-recommends \
8
+ build-essential \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # copy requirements and install
12
+ COPY requirements.txt ./
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # copy app code\ nCOPY . .
16
+
17
+ # expose Hugging Face default port
18
+ EXPOSE 7860
19
+
20
+ # run the FastAPI app using uvicorn on port 7860
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]