michaelj commited on
Commit
0b13e52
1 Parent(s): 94b5b2a

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -7
Dockerfile CHANGED
@@ -1,15 +1,22 @@
1
- FROM ubuntu:20.04
 
 
2
 
3
  RUN apt-get update && apt-get install -y ffmpeg python3-pip
4
 
5
- # Install project dependencies
6
- RUN pip install -r requirements.txt
 
 
 
 
 
7
 
8
- # Copy project code to container
9
- COPY . /app
10
 
11
- # Set working directory
12
- WORKDIR /app
13
 
 
14
  # Start FaceFusion API
15
  CMD ["python", "run.py", "--api"]
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /code
4
 
5
  RUN apt-get update && apt-get install -y ffmpeg python3-pip
6
 
7
+ COPY ./requirements.txt /code/requirements.txt
8
+
9
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
+
11
+ RUN useradd -m -u 1000 user
12
+
13
+ USER user
14
 
15
+ ENV HOME=/home/user \
16
+ PATH=/home/user/.local/bin:$PATH
17
 
18
+ WORKDIR $HOME/app
 
19
 
20
+ COPY --chown=user . $HOME/app
21
  # Start FaceFusion API
22
  CMD ["python", "run.py", "--api"]