Spaces:
Sleeping
Sleeping
Oviya
commited on
Commit
·
bb904fc
1
Parent(s):
e4b7b90
deocker fix
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -10,21 +10,23 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 10 |
&& mkdir -p /etc/apt/keyrings \
|
| 11 |
&& curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \
|
| 12 |
| gpg --dearmor -o /etc/apt/keyrings/microsoft.gpg \
|
| 13 |
-
&& echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/debian/
|
| 14 |
> /etc/apt/sources.list.d/microsoft-prod.list \
|
| 15 |
&& apt-get update && ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql17 \
|
| 16 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
WORKDIR /app
|
|
|
|
|
|
|
| 19 |
COPY requirements.txt .
|
| 20 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
-
#
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
# Hugging Face expects port 7860
|
| 26 |
ENV PORT=7860
|
| 27 |
EXPOSE 7860
|
| 28 |
|
| 29 |
-
# Serve Flask via
|
| 30 |
-
CMD ["gunicorn","-k","gthread","-w","2","--threads","4","--timeout","120","-b","0.0.0.0:7860","server:app"]
|
|
|
|
| 10 |
&& mkdir -p /etc/apt/keyrings \
|
| 11 |
&& curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \
|
| 12 |
| gpg --dearmor -o /etc/apt/keyrings/microsoft.gpg \
|
| 13 |
+
&& echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/debian/11/prod stable main" \
|
| 14 |
> /etc/apt/sources.list.d/microsoft-prod.list \
|
| 15 |
&& apt-get update && ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql17 \
|
| 16 |
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
WORKDIR /app
|
| 19 |
+
|
| 20 |
+
# Copy requirements and install Python dependencies
|
| 21 |
COPY requirements.txt .
|
| 22 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
+
# Bring in the app code (server.py must export `app`)
|
| 25 |
COPY . .
|
| 26 |
|
| 27 |
# Hugging Face expects port 7860
|
| 28 |
ENV PORT=7860
|
| 29 |
EXPOSE 7860
|
| 30 |
|
| 31 |
+
# Serve Flask via Gunicorn
|
| 32 |
+
CMD ["gunicorn", "-k", "gthread", "-w", "2", "--threads", "4", "--timeout", "120", "-b", "0.0.0.0:7860", "server:app"]
|