harshabasavarajbeth commited on
Commit
802a50d
·
verified ·
1 Parent(s): 8d7b10d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.1.2-cuda11.8-cudnn8-runtime
2
+
3
+ WORKDIR /app
4
+
5
+ ENV PYTHONUNBUFFERED=1
6
+ ENV HF_HOME=/app/.cache/huggingface
7
+ ENV TRANSFORMERS_CACHE=/app/.cache/huggingface
8
+ ENV HUGGINGFACE_HUB_CACHE=/app/.cache/huggingface
9
+
10
+ RUN apt-get update && apt-get install -y \
11
+ git \
12
+ wget \
13
+ libgl1 \
14
+ libglib2.0-0 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ COPY requirements.txt .
18
+
19
+ RUN pip install --upgrade pip && \
20
+ pip install --no-cache-dir -r requirements.txt
21
+
22
+ COPY app.py .
23
+
24
+ EXPOSE 7860
25
+
26
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]