caviri commited on
Commit
f92f2c1
·
1 Parent(s): f81b2a4

ci: Testing HF

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -6
Dockerfile CHANGED
@@ -37,15 +37,27 @@ RUN apt-get update && apt-get -y upgrade \
37
  # ODTP setup
38
  ##################################################
39
 
40
- COPY . /digiwild_building
41
- RUN pip3 install -r /digiwild_building/requirements.txt
42
 
43
- RUN useradd -m -u 1001 user
44
  USER user
45
 
46
- COPY --chown=user:user . /digiwild
 
 
47
 
48
- RUN chown -R user:user /digiwild/data /digiwild/app/assets
 
 
 
 
 
 
 
 
 
 
 
49
 
50
- WORKDIR /digiwild
51
  ENTRYPOINT python3 app/main.py
 
37
  # ODTP setup
38
  ##################################################
39
 
40
+ # Set up a new user named "user" with user ID 1000
41
+ RUN useradd -m -u 1000 user
42
 
43
+ # Switch to the "user" user
44
  USER user
45
 
46
+ # Set home to the user's home directory
47
+ ENV HOME=/home/user \
48
+ PATH=/home/user/.local/bin:$PATH
49
 
50
+ # Set the working directory to the user's home directory
51
+ WORKDIR $HOME/digiwild
52
+
53
+ # Try and run pip command after setting the user with `USER user` to avoid permission issues with Python
54
+ RUN pip install --no-cache-dir --upgrade pip
55
+
56
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
57
+ COPY --chown=user . $HOME/digiwild
58
+
59
+ RUN pip3 install -r $HOME/digiwild/requirements.txt
60
+
61
+ #RUN chown -R user:user /digiwild/data /digiwild/app/assets
62
 
 
63
  ENTRYPOINT python3 app/main.py