Spaces:
Sleeping
Sleeping
File size: 1,474 Bytes
23457f2 5545d25 4430426 5545d25 7b80724 fb2cd10 7b80724 a12ce5d d906f96 7b80724 fb2cd10 5545d25 eea2307 d9b9ec4 3e3ab1d fb2cd10 0ec0e81 5545d25 df134f7 0366825 ac1a83e cfcf7f2 fb2cd10 d9b9ec4 96fe515 |
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
git \
git-lfs \
wget \
curl \
ca-certificates \
# python build dependencies \
build-essential \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
libncursesw5-dev \
xz-utils \
tk-dev \
libxml2-dev \
libxmlsec1-dev \
libffi-dev \
liblzma-dev \
# gradio dependencies \
ffmpeg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1001 hf-space
USER hf-space
ENV HOME=/home/hf-space \
PATH=/home/hf-space/.local/bin:${PATH} \
PYTHONPATH=/home/hf-space/app \
PYTHONUNBUFFERED=1 \
GRADIO_ALLOW_FLAGGING=never \
GRADIO_NUM_PORTS=1 \
GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_THEME=huggingface \
SYSTEM=spaces
COPY --chown=1001 . ${HOME}/app
WORKDIR ${HOME}/app
ENV UV_PYTHON_INSTALL_DIR=${HOME}/app/uv-pythons
RUN wget -qO- https://astral.sh/uv/install.sh | sh
RUN mkdir /home/hf-space/app/uv-pythons
RUN chmod -R a+rx /home/hf-space/app/uv-pythons
RUN uv venv --python 3.13.2
RUN uv pip install --no-cache-dir -r /home/hf-space/app/requirements.txt
#RUN chown -R hf-space:hf-space ${HOME}/app
RUN ls -lda /home/hf-space/
RUN ls -lda /home/hf-space/app/uv-pythons/cpython-3.13.2-linux-x86_64-gnu
CMD ["uv", "run", "--no-cache", "--no-config", "app.py"]
|