Spaces:
Paused
Paused
| # Simple approach - just run code-server | |
| FROM python:3.9 | |
| # Install code-server | |
| RUN curl -fsSL https://code-server.dev/install.sh | sh | |
| # Install additional tools | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| nodejs \ | |
| npm \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:$PATH" | |
| WORKDIR /app | |
| # Install Python packages | |
| COPY --chown=user ./requirements.txt requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy your files | |
| COPY --chown=user . /app | |
| # Create workspace | |
| RUN mkdir -p /home/user/workspace | |
| WORKDIR /home/user/workspace | |
| # Copy your app files to workspace | |
| RUN cp -r /app/* . 2>/dev/null || : | |
| EXPOSE 7860 | |
| # Start code-server directly | |
| CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none", "--disable-telemetry", "."] |