Image Classification
PyTorch
English
resnet
ai-detection
imager
Imagers commited on
Commit
d98db7d
·
verified ·
1 Parent(s): 258f844

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ libglib2.0-0 libsm6 libxext6 libxrender1 \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ COPY src/requirements.txt /app/requirements.txt
10
+ RUN pip install --no-cache-dir -r requirements.txt \
11
+ && pip install --no-cache-dir fastapi uvicorn python-multipart
12
+
13
+ COPY src/ /app/src/
14
+ COPY model/ /app/model/
15
+
16
+ EXPOSE 8000
17
+
18
+ CMD ["uvicorn", "src.server:app", "--host", "0.0.0.0", "--port", "8000"]