Imageupscale / Dockerfile
Akwbw's picture
Update Dockerfile
6a7ec23 verified
raw
history blame contribute delete
765 Bytes
# Dockerfile
# Base image
FROM python:3.10-slim
# Working Directory set karein
WORKDIR /app
# 1. Zaroori System dependencies install karein
# - libgl1: libGL.so.1 error ke liye
# - libgthread-2.0-0: libgthread-2.0.so.0 error ke liye
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libgl1 \
libgthread-2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Dependencies file ko copy karein
COPY requirements.txt .
# 2. Python dependencies install karein
RUN pip install --no-cache-dir -r requirements.txt
# Aapki app file ko copy karein
COPY app.py .
# Hugging Face Spaces port 7860 par application run hone ki ummeed rakhta hai
EXPOSE 7860
# Application ko run karein
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]