Segment-Leaf-RFDETR / Dockerfile
Subh775's picture
Update Dockerfile
0730a19 verified
raw
history blame
1.45 kB
# FROM python:3.10-slim
# ENV PYTHONDONTWRITEBYTECODE=1
# ENV PYTHONUNBUFFERED=1
# WORKDIR /app
# RUN apt-get update && apt-get install -y --no-install-recommends \
# build-essential \
# ffmpeg \
# libsndfile1 \
# && rm -rf /var/lib/apt/lists/*
# COPY requirements.txt /app/requirements.txt
# RUN pip install --upgrade pip setuptools wheel
# RUN pip install --no-cache-dir -r /app/requirements.txt
# # copy app
# COPY . /app
# # expose port
# EXPOSE 7860
# # Launch
# CMD ["/bin/bash", "start.sh"]
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV OMP_NUM_THREADS=4
ENV MKL_NUM_THREADS=4
ENV OPENBLAS_NUM_THREADS=4
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ffmpeg \
libsndfile1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
libgomp1 \
fontconfig \
fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /tmp/.fontconfig /tmp/.matplotlib \
&& chmod 777 /tmp/.fontconfig /tmp/.matplotlib
# Copy and install Python dependencies
COPY requirements.txt /app/requirements.txt
RUN pip install --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -r /app/requirements.txt
# Copy application files
COPY . /app
# Create tmp directory for model weights
RUN mkdir -p /tmp
# Expose port
EXPOSE 7860
# Launch
CMD ["/bin/bash", "start.sh"]