tommulder commited on
Commit
e3dbe41
Β·
1 Parent(s): aeafbd9

Fix Dockerfile paths for HF Spaces

Browse files

- Change docker/requirements.txt β†’ requirements.txt
- Change ../src/ β†’ src/
- Change ../models/ β†’ models/
- Change ../main.py β†’ main.py
- Remove unnecessary README.md copy

Files are synced to HF Space root, not docker/ subdirectory.
This fixes build error: docker/requirements.txt not found

Files changed (1) hide show
  1. Dockerfile +6 -7
Dockerfile CHANGED
@@ -29,18 +29,17 @@ WORKDIR $HOME/app
29
  RUN pip install --no-cache-dir --upgrade pip
30
 
31
  # Copy requirements first for better Docker layer caching
32
- COPY --chown=user docker/requirements.txt $HOME/app/
33
 
34
  # Install Python dependencies
35
  RUN pip install --no-cache-dir --user -r requirements.txt
36
 
37
- # Copy the source code from parent directory
38
- COPY --chown=user ../src/ $HOME/app/src/
39
- COPY --chown=user ../models/ $HOME/app/models/
40
 
41
- # Copy the main entry point from parent directory
42
- COPY --chown=user ../main.py $HOME/app/
43
- COPY --chown=user ../README.md $HOME/app/
44
 
45
  # Expose the port that the app runs on (HF Spaces default is 7860)
46
  EXPOSE 7860
 
29
  RUN pip install --no-cache-dir --upgrade pip
30
 
31
  # Copy requirements first for better Docker layer caching
32
+ COPY --chown=user requirements.txt $HOME/app/
33
 
34
  # Install Python dependencies
35
  RUN pip install --no-cache-dir --user -r requirements.txt
36
 
37
+ # Copy the source code
38
+ COPY --chown=user src/ $HOME/app/src/
39
+ COPY --chown=user models/ $HOME/app/models/
40
 
41
+ # Copy the main entry point
42
+ COPY --chown=user main.py $HOME/app/
 
43
 
44
  # Expose the port that the app runs on (HF Spaces default is 7860)
45
  EXPOSE 7860