Spaces:
Runtime error
Runtime error
File size: 869 Bytes
66dfb94 e972367 66dfb94 e972367 66dfb94 e972367 a524b29 66dfb94 a524b29 5085f65 66dfb94 a524b29 66dfb94 e972367 66dfb94 e972367 66dfb94 |
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 28 29 30 31 32 33 34 35 36 37 38 39 |
# Start with the base Python 3.11 image
FROM python:3.11
# Create a new user and set permissions
RUN useradd -m -u 1000 user
# Install required system packages using apt-get
RUN apt-get update && apt-get install -y \
curl \
python3-pip \
build-essential \
libssl-dev \
libffi-dev \
cargo \
&& rm -rf /var/lib/apt/lists/*
ENV VIRTUAL_ENV=/home/packages/.venv
ADD https://astral.sh/uv/install.sh /install.sh
RUN chmod -R 655 /install.sh && /install.sh && rm /install.sh
COPY ./requirements.txt .
RUN /root/.cargo/bin/uv venv /home/packages/.venv
RUN /root/.cargo/bin/uv pip install --no-cache -r requirements.txt
# Set the working directory
WORKDIR /app
# Copy the application code to the working directory
COPY --chown=user . /app
# Expose the port the app runs on
EXPOSE 7860
# Define the default command
CMD ["python", "app.py"]
|