llama3.2-api / Dockerfile
NitinBot001's picture
Update Dockerfile
80e1c62 verified
raw
history blame
681 Bytes
FROM python:3.10-slim
# Create persistent storage directory
RUN mkdir -p /data/model /data/repo && \
chmod -R a+rwx /data
# System dependencies
RUN apt-get update && apt-get install -y \
build-essential \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js and nport
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs && \
npm install -g nport
# Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Application code
COPY app.py .
# Hugging Face Spaces configuration
EXPOSE 7860
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "600", "app:app"]