Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -6
Dockerfile
CHANGED
|
@@ -10,10 +10,9 @@ USER node
|
|
| 10 |
# Set the home directory for clarity
|
| 11 |
ENV HOME=/home/node
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
# Set the prefix for global npm installations to a directory within the user's home
|
| 15 |
ENV NPM_CONFIG_PREFIX=${HOME}/.npm-global
|
| 16 |
-
# Add the new npm global binary
|
| 17 |
ENV PATH=${NPM_CONFIG_PREFIX}/bin:${HOME}/.local/bin:${PATH}
|
| 18 |
|
| 19 |
# Set the working directory inside the user's home
|
|
@@ -22,13 +21,13 @@ WORKDIR ${HOME}/app
|
|
| 22 |
# Install 'uv', the fast Python package manager
|
| 23 |
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
# Install 'bun' globally. It will now be installed in /home/node/.npm-global/
|
| 27 |
RUN npm install -g bun
|
| 28 |
|
|
|
|
| 29 |
# Copy the Python requirements file and install dependencies using uv
|
| 30 |
COPY --chown=node requirements.txt .
|
| 31 |
-
RUN uv pip install -r requirements.txt
|
| 32 |
|
| 33 |
# Copy all other application files
|
| 34 |
COPY --chown=node . .
|
|
|
|
| 10 |
# Set the home directory for clarity
|
| 11 |
ENV HOME=/home/node
|
| 12 |
|
| 13 |
+
# Configure npm to use a user-owned directory for global packages
|
|
|
|
| 14 |
ENV NPM_CONFIG_PREFIX=${HOME}/.npm-global
|
| 15 |
+
# Add the new npm global binary and uv binary directories to the system's PATH
|
| 16 |
ENV PATH=${NPM_CONFIG_PREFIX}/bin:${HOME}/.local/bin:${PATH}
|
| 17 |
|
| 18 |
# Set the working directory inside the user's home
|
|
|
|
| 21 |
# Install 'uv', the fast Python package manager
|
| 22 |
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
|
| 23 |
|
| 24 |
+
# Install 'bun' globally into the user's home directory
|
|
|
|
| 25 |
RUN npm install -g bun
|
| 26 |
|
| 27 |
+
# --- FIX: Add the --system flag to the uv command ---
|
| 28 |
# Copy the Python requirements file and install dependencies using uv
|
| 29 |
COPY --chown=node requirements.txt .
|
| 30 |
+
RUN uv pip install --system -r requirements.txt
|
| 31 |
|
| 32 |
# Copy all other application files
|
| 33 |
COPY --chown=node . .
|