sarthaksavvy commited on
Commit
c06773d
·
1 Parent(s): 9dc6325

[main] try ownership

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -10
Dockerfile CHANGED
@@ -1,23 +1,19 @@
1
  FROM python:3.10-slim
2
 
 
 
 
3
  WORKDIR /app
4
 
 
 
5
  RUN pip install --upgrade pip
6
  RUN pip install fastapi uvicorn transformers
7
  RUN pip install h5py --only-binary h5py
8
  RUN pip install tensorflow tf-keras torch torchvision
9
 
10
- RUN useradd user
11
- # Switch to the "user" user
12
- USER user
13
-
14
- ENV HOME=/home/user \
15
- PATH=/home/user/.local/bin:$PATH
16
-
17
- # Set the working directory to the user's home directory
18
- WORKDIR $HOME/app
19
 
20
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
21
- COPY --chown=user . $HOME/app
22
 
23
  CMD fastapi run --reload --host=0.0.0.0 --port=7860
 
1
  FROM python:3.10-slim
2
 
3
+ RUN useradd user
4
+ USER user
5
+
6
  WORKDIR /app
7
 
8
+ RUN chown -R user:user /app
9
+
10
  RUN pip install --upgrade pip
11
  RUN pip install fastapi uvicorn transformers
12
  RUN pip install h5py --only-binary h5py
13
  RUN pip install tensorflow tf-keras torch torchvision
14
 
 
 
 
 
 
 
 
 
 
15
 
16
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
17
+ # COPY --chown=user . /app
18
 
19
  CMD fastapi run --reload --host=0.0.0.0 --port=7860