File size: 912 Bytes
83e6f13 1083646 5a9a1d5 1083646 83e6f13 1083646 83e6f13 1083646 | 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 | # Dockerfile
FROM python:3.9-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
build-essential \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# Install code-server
# RUN curl -fsSL https://code-server.dev/install.sh | sh
RUN apt-get install code-server
# Verify code-server installation
RUN code-server --version
# Set working directory
WORKDIR /app
# Copy requirements and install Python packages
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Create workspace directory and set permissions
RUN mkdir -p /tmp/workspace && \
mkdir -p /root/.config/code-server && \
chmod -R 755 /tmp/workspace
# Expose ports
EXPOSE 7860 8080
# Set environment variables
ENV PORT=7860
ENV CODE_SERVER_PASSWORD=huggingface123
# Run the application
CMD ["python", "app.py"] |