felixbet commited on
Commit
0835264
·
verified ·
1 Parent(s): a3284b1

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Minimal OS deps for TF on CPU
4
+ RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 curl ca-certificates \
5
+ && rm -rf /var/lib/apt/lists/*
6
+
7
+ ENV PYTHONDONTWRITEBYTECODE=1 \
8
+ PYTHONUNBUFFERED=1 \
9
+ TF_CPP_MIN_LOG_LEVEL=2 \
10
+ MODEL_DIR=/app/bert_tf
11
+
12
+ WORKDIR /app
13
+
14
+ # Python deps
15
+ COPY requirements.txt /app/
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # App + bootstrap
19
+ COPY app.py /app/
20
+ COPY start.sh /app/
21
+ RUN chmod +x /app/start.sh
22
+
23
+ # If you later decide to commit weights, put them under /app/bert_tf/ and COPY here.
24
+ # For free-tier friendliness we download at startup instead.
25
+
26
+ EXPOSE 7860
27
+ CMD ["/app/start.sh"]