LogicGoInfotechSpaces commited on
Commit
860beff
·
verified ·
1 Parent(s): 589f9a6

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -------- Base Image --------
2
+ FROM python:3.11-slim
3
+
4
+ # -------- Work Directory --------
5
+ WORKDIR /app
6
+
7
+ # -------- Install System Dependencies --------
8
+ RUN apt-get update && apt-get install -y \
9
+ gcc \
10
+ libffi-dev \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # -------- Copy App Files --------
14
+ COPY . /app
15
+
16
+ # -------- Install Python Dependencies --------
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # HuggingFace Spaces expect the app to run on port 7860
20
+ ENV PORT=7860
21
+
22
+ # -------- Expose Port --------
23
+ EXPOSE 7860
24
+
25
+ # -------- Start FastAPI Server --------
26
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]