MatrixIA commited on
Commit
97f4fc4
·
verified ·
1 Parent(s): dddad2e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1 \
5
+ PIP_DISABLE_PIP_VERSION_CHECK=on
6
+
7
+ WORKDIR /app
8
+
9
+ COPY requirements.txt /app/requirements.txt
10
+ RUN pip install --no-cache-dir -r /app/requirements.txt
11
+
12
+ # copy your FastAPI app
13
+ COPY app /app/app
14
+
15
+ # Hugging Face Spaces expose your app on PORT (defaults to 7860)
16
+ ENV PORT=7860
17
+ EXPOSE 7860
18
+
19
+ CMD uvicorn app.main:app --host 0.0.0.0 --port ${PORT}