Salary_Pred_Basic / Dockerfile
AvtnshM's picture
Create Dockerfile
f3e427f verified
raw
history blame contribute delete
668 Bytes
# Minimal Dockerfile for HF Spaces - avoids libgl1-mesa-glx
FROM python:3.10-slim
WORKDIR /home/user/app
# Install small set of system deps commonly needed (no libgl1-mesa-glx)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
git-lfs \
ffmpeg \
libsm6 \
libxext6 \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy app files
COPY . /home/user/app
# Install Python deps
COPY requirements.txt /tmp/requirements.txt
RUN python -m pip install --upgrade pip && \
pip install --no-cache-dir -r /tmp/requirements.txt
# Expose port and run
ENV PORT 7860
EXPOSE 7860
CMD ["python", "app.py"]