swastikbansal commited on
Commit
36bd814
·
1 Parent(s): cd1e957

Renamed dockerfile

Browse files
Files changed (1) hide show
  1. deploy.dockerfile → dockerfile +30 -30
deploy.dockerfile → dockerfile RENAMED
@@ -1,30 +1,30 @@
1
- FROM python:3.10-slim
2
-
3
- ENV PYTHONUNBUFFERED=1 \
4
- PIP_NO_CACHE_DIR=1
5
-
6
- WORKDIR /app
7
-
8
- # Install minimal build tools (some packages require compilation)
9
- RUN apt-get update && apt-get install -y --no-install-recommends \
10
- build-essential \
11
- gcc \
12
- ca-certificates \
13
- && rm -rf /var/lib/apt/lists/*
14
-
15
- # Install Python deps (cache layer)
16
- COPY requirements.txt .
17
- RUN pip install --upgrade pip setuptools wheel && pip install -r requirements.txt
18
-
19
- # Create a non-root user and set ownership
20
- RUN useradd -m appuser && mkdir -p /app
21
- USER appuser
22
-
23
- # Copy application code
24
- COPY --chown=appuser:appuser . .
25
-
26
- # Hugging Face Spaces expects the web process to listen on the provided PORT (defaults to 7860)
27
- EXPOSE 7860
28
-
29
- # Use PORT env if set by Spaces, default to 7860; include proxy headers for correct client IPs
30
- CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860} --proxy-headers"]
 
1
+ FROM python:3.10-slim
2
+
3
+ ENV PYTHONUNBUFFERED=1 \
4
+ PIP_NO_CACHE_DIR=1
5
+
6
+ WORKDIR /app
7
+
8
+ # Install minimal build tools (some packages require compilation)
9
+ RUN apt-get update && apt-get install -y --no-install-recommends \
10
+ build-essential \
11
+ gcc \
12
+ ca-certificates \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Install Python deps (cache layer)
16
+ COPY requirements.txt .
17
+ RUN pip install --upgrade pip setuptools wheel && pip install -r requirements.txt
18
+
19
+ # Create a non-root user and set ownership
20
+ RUN useradd -m appuser && mkdir -p /app
21
+ USER appuser
22
+
23
+ # Copy application code
24
+ COPY --chown=appuser:appuser . .
25
+
26
+ # Hugging Face Spaces expects the web process to listen on the provided PORT (defaults to 7860)
27
+ EXPOSE 7860
28
+
29
+ # Use PORT env if set by Spaces, default to 7860; include proxy headers for correct client IPs
30
+ CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860} --proxy-headers"]