xynull commited on
Commit
aff3d4b
·
1 Parent(s): b7b8fe3

Add application file

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -5
Dockerfile CHANGED
@@ -1,14 +1,17 @@
1
  FROM python:3.9
2
 
3
- WORKDIR /code
 
 
 
4
 
5
- COPY ./requirements.txt /code/requirements.txt
6
 
7
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
- COPY . .
10
 
11
- RUN mkdir -p /.cache/huggingface
12
 
13
  RUN python gpt2.py
14
 
 
1
  FROM python:3.9
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 ./requirements.txt $HOME/app/requirements.txt
11
 
12
+ RUN pip install --no-cache-dir --upgrade -r $HOME/app/requirements.txt
13
 
14
+ COPY --chown=user . $HOME/app
15
 
16
  RUN python gpt2.py
17