LalitChaudhari3 commited on
Commit
1c7ac05
·
verified ·
1 Parent(s): b5ffc55

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -1,21 +1,21 @@
1
- # 1. Use Python
2
  FROM python:3.9
3
 
4
- # 2. Set up the folder
5
  WORKDIR /code
6
 
7
- # 3. Install dependencies
8
  COPY ./requirements.txt /code/requirements.txt
9
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
 
11
- # 4. Copy your app code
12
  COPY . /code
13
 
14
- # 5. Create a user (Security requirement for Hugging Face)
15
  RUN useradd -m -u 1000 user
16
  USER user
17
  ENV HOME=/home/user \
18
  PATH=/home/user/.local/bin:$PATH
19
 
20
- # 6. Run the app on port 7860
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # 1. Use Python Image
2
  FROM python:3.9
3
 
4
+ # 2. Set Working Directory
5
  WORKDIR /code
6
 
7
+ # 3. Copy Requirements & Install
8
  COPY ./requirements.txt /code/requirements.txt
9
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
 
11
+ # 4. COPY EVERYTHING (This copies index.html, app.py, and your src/ folder)
12
  COPY . /code
13
 
14
+ # 5. Create User (Hugging Face Security Requirement)
15
  RUN useradd -m -u 1000 user
16
  USER user
17
  ENV HOME=/home/user \
18
  PATH=/home/user/.local/bin:$PATH
19
 
20
+ # 6. Run the App using the new filename 'app.py'
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]