Kan05 commited on
Commit
f9c637a
·
verified ·
1 Parent(s): 66803e6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -22
Dockerfile CHANGED
@@ -1,22 +1,21 @@
1
- # Use Python 3.11
2
- FROM python:3.11
3
-
4
- # Set working directory to /code
5
- WORKDIR /code
6
-
7
- # Copy requirements and install dependencies
8
- COPY ./requirements.txt /code/requirements.txt
9
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
-
11
- # Copy the rest of the backend code
12
- COPY . /code/backend
13
-
14
- # Create a non-root user (Required for Hugging Face security)
15
- RUN useradd -m -u 1000 user
16
- USER user
17
- ENV HOME=/home/user \
18
- PATH=/home/user/.local/bin:$PATH
19
-
20
- # Expose port 7860 (Specific to Hugging Face Spaces)
21
- WORKDIR /code
22
- CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use Python 3.11
2
+ FROM python:3.11
3
+
4
+ # Set working directory to /code
5
+ WORKDIR /code
6
+
7
+ # Copy requirements and install
8
+ COPY requirements.txt /code/requirements.txt
9
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
10
+
11
+ # --- FIX: Copy ALL files from the root to /code ---
12
+ COPY . /code
13
+
14
+ # Create a non-root user (Required for HF Security)
15
+ RUN useradd -m -u 1000 user
16
+ USER user
17
+ ENV HOME=/home/user \
18
+ PATH=/home/user/.local/bin:$PATH
19
+
20
+ # Expose port and run
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]