ChiragPatankar commited on
Commit
e2ed9d3
·
verified ·
1 Parent(s): de7aa42

Create DOCKERFILE

Browse files
Files changed (1) hide show
  1. DOCKERFILE +26 -0
DOCKERFILE ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use slim Python image
2
+ FROM python:3.11-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies (for psycopg2 and bcrypt)
8
+ RUN apt-get update && apt-get install -y \
9
+ gcc \
10
+ libpq-dev \
11
+ build-essential \
12
+ libffi-dev \
13
+ libssl-dev \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Copy your app files
17
+ COPY . /app
18
+
19
+ # Install Python dependencies
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Expose the default port for Hugging Face Spaces
23
+ EXPOSE 7860
24
+
25
+ # Start your FastAPI app
26
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]