Tyy / Dockerfile
Pubgbc9799's picture
Create Dockerfile
c75f98f verified
raw
history blame contribute delete
595 Bytes
# 1. Python ka base image use karein
FROM python:3.10-slim
# 2. Working directory set karein
WORKDIR /app
# 3. System dependencies install karein (agar terabox library ko chahiye ho)
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# 4. Sabse pehle requirements file copy karein
COPY requirements.txt .
# 5. Dependencies install karein
RUN pip install --no-cache-dir -r requirements.txt
# 6. Pura code copy karein
COPY . .
# 7. Hugging Face port 7860 use karta hai
EXPOSE 7860
# 8. App ko start karne ki command
CMD ["python", "app.py"]