Techbitforge commited on
Commit
9579c31
·
verified ·
1 Parent(s): 802e7dc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- wget git \
6
- build-essential \
7
  && rm -rf /var/lib/apt/lists/*
8
 
9
- # Create and chmod /data so your code can write there
10
  RUN mkdir /data && chmod 777 /data
11
 
 
12
  WORKDIR /app
13
 
14
- # Copy and install Python packages
15
  COPY requirements.txt ./
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # Download your server.py as app.py
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 via Gunicorn, binding to 0.0.0.0:7860
27
- CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "1"]
 
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"]