varunka commited on
Commit
931e4ea
·
1 Parent(s): d4230e6

backend 11

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -13,12 +13,12 @@ RUN apt-get update && apt-get install -y \
13
  WORKDIR /app
14
 
15
  # Install Python dependencies first for better layer caching.
16
- COPY backend/requirements.txt backend/requirements.txt
17
  RUN pip install --no-cache-dir --upgrade pip setuptools wheel
18
  RUN pip install --no-cache-dir \
19
  --extra-index-url https://download.pytorch.org/whl/cpu \
20
  torch==2.5.1+cpu torchvision==0.20.1+cpu torchaudio==2.5.1+cpu
21
- RUN pip install --no-cache-dir -r backend/requirements.txt
22
 
23
  # Copy the full application.
24
  COPY . /app
@@ -29,10 +29,10 @@ USER user
29
  ENV HOME=/home/user
30
 
31
  # Create necessary directories
32
- RUN mkdir -p backend/ml/weights backend/uploads
33
 
34
  # Expose default port (platform may override via PORT env var)
35
  EXPOSE 7860
36
 
37
  # Run FastAPI using platform PORT when provided.
38
- CMD sh -c "cd backend && uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860}"
 
13
  WORKDIR /app
14
 
15
  # Install Python dependencies first for better layer caching.
16
+ COPY requirements.txt requirements.txt
17
  RUN pip install --no-cache-dir --upgrade pip setuptools wheel
18
  RUN pip install --no-cache-dir \
19
  --extra-index-url https://download.pytorch.org/whl/cpu \
20
  torch==2.5.1+cpu torchvision==0.20.1+cpu torchaudio==2.5.1+cpu
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
 
23
  # Copy the full application.
24
  COPY . /app
 
29
  ENV HOME=/home/user
30
 
31
  # Create necessary directories
32
+ RUN mkdir -p ml/weights uploads
33
 
34
  # Expose default port (platform may override via PORT env var)
35
  EXPOSE 7860
36
 
37
  # Run FastAPI using platform PORT when provided.
38
+ CMD sh -c "uvicorn main:app --host 0.0.0.0 --port ${PORT:-7860}"