apise / Dockerfile
Techbitforge's picture
Update Dockerfile
6ee16f9 verified
raw
history blame
633 Bytes
FROM python:3.12-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
wget git build-essential \
&& rm -rf /var/lib/apt/lists/*
# Create a writable directory for app data
RUN mkdir /data && chmod 777 /data
WORKDIR /app
# Copy requirements and install
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Clone your code
RUN git clone https://huggingface.co/datasets/Techbitforge/api/
RUN mkdir /api/ASSETS && chmod 777 /api/ASSETS
EXPOSE 7860
# Start Gunicorn pointing to api.server:app
CMD ["gunicorn", "api.server:app", "--bind", "0.0.0.0:7860", "--workers", "1"]