diogenemudenge commited on
Commit
2809008
·
verified ·
1 Parent(s): af2855f

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -7
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- # ===== SuperKart Backend (Flask) =====
2
  FROM python:3.11-slim
3
 
4
  # Basic env hygiene
@@ -9,21 +9,27 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
9
  WORKDIR /app
10
 
11
  # Install system deps (if you need gcc for some pip builds, uncomment the next line)
12
- # RUN apt-get update && apt-get install -y --no-install-recommends build-essential && rm -rf /var/lib/apt/lists/*
 
 
13
 
14
- # Copy requirements first for better caching
15
  COPY requirements.txt /app/requirements.txt
16
 
17
  # Install Python deps (add gunicorn here to serve Flask in production)
18
- RUN pip install --no-cache-dir -r /app/requirements.txt \
19
  && pip install --no-cache-dir gunicorn==21.2.0
20
 
21
  # Copy the backend app
22
  COPY . /app
23
 
24
- # Expose a port (Spaces will inject PORT; exposing is optional but helpful locally)
 
25
  EXPOSE 7860
26
 
27
- # Default to gunicorn, binding to $PORT if provided (Spaces) or 8000 locally
28
  ENV PORT=7860
29
- CMD ["sh", "-c", "gunicorn --bind 0.0.0.0:${PORT:-8000} app:app"]
 
 
 
 
 
1
+ # ==== Superkart Backend (Flask) ====
2
  FROM python:3.11-slim
3
 
4
  # Basic env hygiene
 
9
  WORKDIR /app
10
 
11
  # Install system deps (if you need gcc for some pip builds, uncomment the next line)
12
+ # RUN apt-get update && apt-get install -y --no-install-recommends build-essential && rm-rf /var/lib/apt/lists/*
13
+
14
+ #Copy requirements first for better caching
15
 
 
16
  COPY requirements.txt /app/requirements.txt
17
 
18
  # Install Python deps (add gunicorn here to serve Flask in production)
19
+ RUN pip install --no-cache-dir- r /app/requirements.txt \
20
  && pip install --no-cache-dir gunicorn==21.2.0
21
 
22
  # Copy the backend app
23
  COPY . /app
24
 
25
+ # Expose a port (Spaces will not inject PORT; exposing is optional but helpful locally)
26
+
27
  EXPOSE 7860
28
 
29
+ # Default to gunicorn, binding to $PORT if provided (Spaces) or 8000 locally
30
  ENV PORT=7860
31
+
32
+ CMD ["sh", "-c","gunicorn --bind=0.0.0.0:${PORT:-8000} app:app"]
33
+
34
+
35
+