nulltron commited on
Commit
5a03a3b
·
verified ·
1 Parent(s): 305cc8b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ # Install system essential dependencies for building C/C++ packages
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ cmake \
7
+ git \
8
+ wget \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ WORKDIR /code
12
+
13
+ # Copy requirements and install pre-built wheel index for superfast CPU performance
14
+ COPY ./requirements.txt /code/requirements.txt
15
+ RUN pip install --no-cache-dir --upgrade pip && \
16
+ pip install --no-cache-dir -r /code/requirements.txt
17
+
18
+ # Copy all application files to the container workspace
19
+ COPY . .
20
+
21
+ # Expose port 7860 which is standard for Hugging Face Spaces
22
+ EXPOSE 7860
23
+
24
+ # Command to run FastAPI server on 0.0.0.0
25
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]