Spaces:
Runtime error
Runtime error
docker
Browse files- Dockerfile +11 -4
Dockerfile
CHANGED
|
@@ -7,6 +7,9 @@ ENV NODE_MAJOR=20
|
|
| 7 |
|
| 8 |
RUN apt-get update && apt-get install --no-install-recommends -y \
|
| 9 |
build-essential \
|
|
|
|
|
|
|
|
|
|
| 10 |
git \
|
| 11 |
ffmpeg \
|
| 12 |
google-perftools \
|
|
@@ -23,15 +26,19 @@ RUN apt-get update && apt-get install nodejs -y
|
|
| 23 |
|
| 24 |
COPY ./server/requirements.txt /code/requirements.txt
|
| 25 |
|
| 26 |
-
#
|
| 27 |
-
|
| 28 |
-
RUN uv
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
# Set up a new user named "user" with user ID 1000
|
| 31 |
RUN useradd -m -u 1000 user
|
| 32 |
|
| 33 |
# Install dependencies using UV as root
|
| 34 |
-
RUN uv pip install --system --index-strategy=unsafe-best-match -r /code/requirements.txt
|
| 35 |
|
| 36 |
# Switch to the "user" user
|
| 37 |
USER user
|
|
|
|
| 7 |
|
| 8 |
RUN apt-get update && apt-get install --no-install-recommends -y \
|
| 9 |
build-essential \
|
| 10 |
+
python3.10 \
|
| 11 |
+
python3-pip \
|
| 12 |
+
python3-dev \
|
| 13 |
git \
|
| 14 |
ffmpeg \
|
| 15 |
google-perftools \
|
|
|
|
| 26 |
|
| 27 |
COPY ./server/requirements.txt /code/requirements.txt
|
| 28 |
|
| 29 |
+
# Download and install UV
|
| 30 |
+
ADD https://astral.sh/uv/install.sh /uv-installer.sh
|
| 31 |
+
RUN chmod +x /uv-installer.sh && \
|
| 32 |
+
/uv-installer.sh && \
|
| 33 |
+
rm /uv-installer.sh
|
| 34 |
+
|
| 35 |
+
ENV PATH="/root/.local/bin:$PATH"
|
| 36 |
|
| 37 |
# Set up a new user named "user" with user ID 1000
|
| 38 |
RUN useradd -m -u 1000 user
|
| 39 |
|
| 40 |
# Install dependencies using UV as root
|
| 41 |
+
RUN uv pip install --no-cache --system --index-strategy=unsafe-best-match -r /code/requirements.txt
|
| 42 |
|
| 43 |
# Switch to the "user" user
|
| 44 |
USER user
|