Spaces:
Running
Running
File size: 934 Bytes
903c838 831a83f 903c838 06a4efd 49caea1 8e75cdc 06a4efd |
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 |
# Use a base image with Python and Node.js pre-installed
FROM node:22-bullseye-slim
# Install Python and pip
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Install corepack (for pnpm and yarn) and make them available
RUN corepack enable \
&& corepack prepare pnpm@latest --activate \
&& corepack prepare yarn@latest --activate
# Install huggingface_hub and huggingface_hub[cli]
RUN pip install -U "huggingface_hub"
# Define a working directory
WORKDIR /app
# Copy the script that will handle the build process
COPY build.sh /app/build.sh
RUN chmod +x /app/build.sh
COPY app.js /app/app.js
COPY index.html /app/index.html
RUN mkdir /app/space
RUN chown -R 1000:1000 /app/space
# Command to run the build script, when launched from a job
# CMD ["/app/build.sh"]
CMD ["python3", "-m", "http.server", "7860", "--directory", "/app"] |