ganeshkonapalli commited on
Commit
52a8f2d
·
verified ·
1 Parent(s): 9594995

Create Dcokerfile

Browse files
Files changed (1) hide show
  1. Dcokerfile +28 -0
Dcokerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python slim image
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE 1
6
+ ENV PYTHONUNBUFFERED 1
7
+
8
+ # Set working directory
9
+ WORKDIR /code
10
+
11
+ # Install OS dependencies (none needed for Logistic Regression, optional: git, curl, etc.)
12
+ RUN apt-get update && \
13
+ apt-get install -y --no-install-recommends \
14
+ build-essential && \
15
+ rm -rf /var/lib/apt/lists/*
16
+
17
+ # Copy requirements and install Python packages
18
+ COPY requirements.txt .
19
+ RUN pip install --upgrade pip && pip install -r requirements.txt
20
+
21
+ # Copy application files
22
+ COPY . .
23
+
24
+ # Expose port (for HF Spaces or local dev)
25
+ EXPOSE 7860
26
+
27
+ # Run FastAPI app
28
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]