Bl4ckSpaces commited on
Commit
1b589b1
·
verified ·
1 Parent(s): 3c22ca6

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # System deps (PIL butuh libjpeg, dll)
6
+ RUN apt-get update && apt-get install -y \
7
+ libjpeg62-turbo-dev \
8
+ zlib1g-dev \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ COPY app.py .
15
+
16
+ EXPOSE 7860
17
+
18
+ # Uvicorn with good defaults untuk Docker Space
19
+ CMD ["uvicorn", "app:app", \
20
+ "--host", "0.0.0.0", \
21
+ "--port", "7860", \
22
+ "--workers", "4", \
23
+ "--limit-concurrency", "500", \
24
+ "--timeout-keep-alive", "65"]