serverAPI / Dockerfile
Techbitforge's picture
Upload 3 files
9ed359f verified
raw
history blame
646 Bytes
FROM python:3.12-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
wget \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Create and chmod /data so your code can write there
RUN mkdir /data && chmod 777 /data
WORKDIR /app
# Copy and install Python packages
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Download your server.py as app.py
RUN wget https://huggingface.co/datasets/Techbitforge/0/resolve/main/server.py \
-O app.py
EXPOSE 7860
# Run via Gunicorn, binding to 0.0.0.0:7860
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "1"]