Spaces:
Sleeping
Sleeping
File size: 1,066 Bytes
8635771 c106911 8635771 c106911 8635771 c106911 8635771 c106911 8635771 c106911 8635771 c106911 8635771 c106911 4462b60 8635771 c106911 | 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 | FROM python:3.9-slim-bullseye
# Install necessary tools (curl, git, sudo, etc.)
RUN apt-get update && apt-get install -y \
curl \
git \
sudo \
sqlite3 \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Latest Current Node.js Version (v26.x) via NodeSource
RUN curl -fsSL https://deb.nodesource.com/setup_current.x | bash - && \
apt-get install -y nodejs
# Install latest npm and Gemini CLI globally
RUN npm install -g npm@latest && \
npm install -g @google/gemini-cli
# Install code-server (Web version of VSCode)
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Create a non-root user for security purposes
RUN useradd -m -u 1000 user && \
echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Hugging Face Space uses port 7860
ENV PORT=7860
EXPOSE 7860
# Set working directory
WORKDIR /home/user
# Copy entrypoint script and grant execution permissions
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Switch to non-root user
USER user
# Execution command
ENTRYPOINT ["/entrypoint.sh"]
|