Spaces:
Sleeping
Sleeping
File size: 730 Bytes
0272714 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | FROM continuumio/miniconda3
# Update apt-get and install basic utilities
RUN apt-get update -y && apt-get install -y nano unzip curl
# THIS IS SPECIFIC TO HUGGINGFACE: Create a non-root user
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user
ENV PATH=/home/user/.local/bin:$PATH
# Set working directory
WORKDIR $HOME/app
# Copy only requirements file first to leverage Docker caching
COPY --chown=user requirements.txt /dependencies/requirements.txt
# Install Python dependencies from requirements.txt
RUN pip install --no-cache-dir -r /dependencies/requirements.txt
# Copy the rest of the application code
COPY --chown=user . $HOME/app
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |