Spaces:
Sleeping

puterjs / Dockerfile
iudd
Add Dockerfile for Hugging Face Docker Space deployment
7414ed3
Raw History Blame Contribute Delete
851 Bytes
FROM debian:bullseye-slim
# Install system dependencies
# We install curl, jq, socat, gzip as required by start.sh
# ca-certificates is needed for curl to verify SSL
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
jq \
socat \
gzip \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Set up a working directory
WORKDIR /app
# Copy all files from the current directory to /app
COPY . /app
# Ensure start.sh is executable
RUN chmod +x start.sh
# Create a non-root user (Hugging Face Spaces default user ID is 1000)
RUN useradd -m -u 1000 user
# Change ownership of the app directory to the user
RUN chown -R user:user /app
# Switch to the non-root user
USER user
# Expose the port expected by Hugging Face Spaces
EXPOSE 7860
# Define the command to run the application
CMD ["./start.sh"]