wyksdsg commited on
Commit
221ea4d
·
verified ·
1 Parent(s): dfe5fb8

Create dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +17 -0
dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM pytorch/pytorch:2.3.1-cuda12.1-cudnn8-runtime
2
+
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
+ WORKDIR /app
8
+
9
+ COPY --chown=user requirements.txt ./requirements.txt
10
+ RUN pip install --no-cache-dir --upgrade pip && \
11
+ pip install --no-cache-dir -r requirements.txt
12
+
13
+ COPY --chown=user . /app
14
+
15
+ ENV HF_HOME=/data/hf_cache
16
+
17
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]