gyubin02 commited on
Commit
2e69346
·
1 Parent(s): 4b5f87b

docker file

Browse files
Files changed (2) hide show
  1. Dockerfile +30 -0
  2. requirements.txt +1 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1 \
5
+ PIP_NO_CACHE_DIR=1 \
6
+ HF_HOME=/tmp/hf \
7
+ TRANSFORMERS_CACHE=/tmp/hf \
8
+ TOKENIZERS_PARALLELISM=false
9
+
10
+ WORKDIR /app
11
+
12
+ RUN apt-get update && apt-get install -y --no-install-recommends \
13
+ git \
14
+ libgomp1 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ COPY requirements.txt .
18
+
19
+ RUN pip install --no-cache-dir --upgrade pip \
20
+ && pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu \
21
+ && pip install --no-cache-dir -r requirements.txt
22
+
23
+ COPY . .
24
+
25
+ RUN mkdir -p /app/chroma_db \
26
+ && chmod -R 777 /app
27
+
28
+ EXPOSE 7860
29
+
30
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt CHANGED
@@ -14,3 +14,4 @@ scikit-learn>=1.3
14
  chromadb>=0.5
15
  fastapi>=0.110
16
  uvicorn>=0.29
 
 
14
  chromadb>=0.5
15
  fastapi>=0.110
16
  uvicorn>=0.29
17
+ tqdm>=4.66