TeePoat commited on
Commit
8bd59b7
·
verified ·
1 Parent(s): e184671

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -4
Dockerfile CHANGED
@@ -1,13 +1,18 @@
1
  FROM python:3.12
2
 
3
- WORKDIR .
 
 
 
4
 
5
- COPY . .
6
 
7
- ENV HF_HOME=./
8
 
9
  RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
10
  RUN pip install --no-cache-dir -r models/transformer/requirements.txt
11
  RUN pip install --no-cache-dir -r models/seq2seq/requirements.txt
12
 
13
- CMD ["uvicorn", "server:app", "--port", "80"]
 
 
 
1
  FROM python:3.12
2
 
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV HOME=/home/user \
6
+ PATH=/home/user/.local/bin:$PATH
7
 
8
+ WORKDIR $HOME/app
9
 
10
+ COPY --chown=user . $HOME/app
11
 
12
  RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
13
  RUN pip install --no-cache-dir -r models/transformer/requirements.txt
14
  RUN pip install --no-cache-dir -r models/seq2seq/requirements.txt
15
 
16
+ EXPOSE 7860
17
+
18
+ CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]