E-slam commited on
Commit
9279dda
·
verified ·
1 Parent(s): 2157c74

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -14
Dockerfile CHANGED
@@ -1,23 +1,11 @@
1
  FROM python:3.9
2
 
3
- # Install sudo package
4
- RUN apt-get update && apt-get install -y sudo
5
-
6
- # Create user with UID 1000 and add to sudoers
7
- RUN useradd -m -u 1000 user && echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
8
-
9
- USER user
10
-
11
  WORKDIR /code
12
 
13
- # Copy requirements and set permissions
14
  COPY ./requirements.txt /code/requirements.txt
15
- RUN sudo chown -R user:user /code
16
 
17
- # Install dependencies
18
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
19
 
20
- # Copy the rest of the application code and set permissions
21
- COPY --chown=user:user . /code
22
 
23
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
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
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]