Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -10
Dockerfile
CHANGED
@@ -2,26 +2,24 @@ FROM python:3.12-slim
|
|
2 |
|
3 |
# Install system dependencies
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
-
|
6 |
-
build-essential \
|
7 |
&& rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
-
# Create
|
10 |
RUN mkdir /data && chmod 777 /data
|
11 |
|
|
|
12 |
WORKDIR /app
|
13 |
|
14 |
-
# Copy and install
|
15 |
COPY requirements.txt ./
|
16 |
RUN pip install --no-cache-dir -r requirements.txt
|
17 |
|
18 |
-
#
|
19 |
-
|
20 |
RUN git clone https://huggingface.co/datasets/Techbitforge/api/
|
21 |
-
RUN ls api
|
22 |
-
RUN ls
|
23 |
|
|
|
24 |
EXPOSE 7860
|
25 |
|
26 |
-
# Run
|
27 |
-
CMD ["gunicorn", "
|
|
|
2 |
|
3 |
# Install system dependencies
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
+
wget git build-essential \
|
|
|
6 |
&& rm -rf /var/lib/apt/lists/*
|
7 |
|
8 |
+
# Create data directory
|
9 |
RUN mkdir /data && chmod 777 /data
|
10 |
|
11 |
+
# Set working directory
|
12 |
WORKDIR /app
|
13 |
|
14 |
+
# Copy requirements and install
|
15 |
COPY requirements.txt ./
|
16 |
RUN pip install --no-cache-dir -r requirements.txt
|
17 |
|
18 |
+
# Clone the repo containing your app code
|
|
|
19 |
RUN git clone https://huggingface.co/datasets/Techbitforge/api/
|
|
|
|
|
20 |
|
21 |
+
# Expose port
|
22 |
EXPOSE 7860
|
23 |
|
24 |
+
# Run Gunicorn, pointing to api.server:app
|
25 |
+
CMD ["gunicorn", "api.server:app", "--bind", "0.0.0.0:7860", "--workers", "1"]
|