Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -33
Dockerfile
CHANGED
|
@@ -3,55 +3,29 @@ FROM ubuntu:22.04
|
|
| 3 |
# Set environment variables
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
ENV HOME=/root
|
| 6 |
-
# CUDA paths for when running on GPU (RunPod)
|
| 7 |
-
ENV CUDA_HOME=/usr/local/cuda
|
| 8 |
-
ENV PATH=${CUDA_HOME}/bin:${PATH}
|
| 9 |
-
ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
| 10 |
|
| 11 |
-
# Install dependencies,
|
| 12 |
RUN apt-get update && \
|
| 13 |
-
apt-get install -y software-properties-common && \
|
|
|
|
| 14 |
add-apt-repository ppa:deadsnakes/ppa && \
|
| 15 |
apt-get update && \
|
| 16 |
-
apt-get install -y \
|
| 17 |
-
curl \
|
| 18 |
-
wget \
|
| 19 |
-
gpg \
|
| 20 |
-
apt-transport-https \
|
| 21 |
-
git \
|
| 22 |
-
python3.12 \
|
| 23 |
-
python3.12-venv \
|
| 24 |
-
python3.12-dev \
|
| 25 |
-
python3-pip && \
|
| 26 |
-
# Install Node.js 22.x from NodeSource
|
| 27 |
-
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \
|
| 28 |
-
apt-get install -y nodejs && \
|
| 29 |
# Make Python 3.12 the default
|
| 30 |
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \
|
| 31 |
update-alternatives --set python3 /usr/bin/python3.12 && \
|
| 32 |
# Install pip for Python 3.12
|
| 33 |
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 && \
|
| 34 |
-
# Upgrade pip
|
| 35 |
-
python3 -m pip install --
|
| 36 |
# Install code-server
|
| 37 |
curl -fsSL https://code-server.dev/install.sh | sh && \
|
| 38 |
apt-get clean && \
|
| 39 |
rm -rf /var/lib/apt/lists/*
|
| 40 |
|
| 41 |
-
# Install global npm packages
|
| 42 |
-
RUN npm install -g @anthropic-ai/claude-code @anthropic-ai/dxt
|
| 43 |
-
|
| 44 |
# Create a directory for the workspace
|
| 45 |
RUN mkdir -p /workspace
|
| 46 |
|
| 47 |
-
# Copy requirements file (if it exists)
|
| 48 |
-
COPY requirements.txt* /workspace/
|
| 49 |
-
|
| 50 |
-
# Install Python packages if requirements.txt exists
|
| 51 |
-
RUN if [ -f /workspace/requirements.txt ]; then \
|
| 52 |
-
pip3 install --no-cache-dir -r /workspace/requirements.txt; \
|
| 53 |
-
fi
|
| 54 |
-
|
| 55 |
# Create configuration directory for code-server and Ollama
|
| 56 |
RUN mkdir -p /root/.config/code-server /root/.ollama
|
| 57 |
|
|
@@ -77,7 +51,7 @@ sleep 2\n\
|
|
| 77 |
# Start code-server in the foreground\n\
|
| 78 |
exec code-server --disable-telemetry --bind-addr 0.0.0.0:8443 /workspace\n\
|
| 79 |
' > /start.sh && \
|
| 80 |
-
chmod +x /start.sh
|
| 81 |
|
| 82 |
# Expose ports for both services
|
| 83 |
EXPOSE 8443 11434
|
|
|
|
| 3 |
# Set environment variables
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
ENV HOME=/root
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
# Install dependencies, code-server, and Ollama
|
| 8 |
RUN apt-get update && \
|
| 9 |
+
apt-get install -y curl wget gpg apt-transport-https git nodejs npm python3 python3-pip software-properties-common && \
|
| 10 |
+
# Add Python 3.12
|
| 11 |
add-apt-repository ppa:deadsnakes/ppa && \
|
| 12 |
apt-get update && \
|
| 13 |
+
apt-get install -y python3.12 python3.12-venv python3.12-dev && \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
# Make Python 3.12 the default
|
| 15 |
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \
|
| 16 |
update-alternatives --set python3 /usr/bin/python3.12 && \
|
| 17 |
# Install pip for Python 3.12
|
| 18 |
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 && \
|
| 19 |
+
# Upgrade pip
|
| 20 |
+
python3 -m pip install --upgrade pip && \
|
| 21 |
# Install code-server
|
| 22 |
curl -fsSL https://code-server.dev/install.sh | sh && \
|
| 23 |
apt-get clean && \
|
| 24 |
rm -rf /var/lib/apt/lists/*
|
| 25 |
|
|
|
|
|
|
|
|
|
|
| 26 |
# Create a directory for the workspace
|
| 27 |
RUN mkdir -p /workspace
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
# Create configuration directory for code-server and Ollama
|
| 30 |
RUN mkdir -p /root/.config/code-server /root/.ollama
|
| 31 |
|
|
|
|
| 51 |
# Start code-server in the foreground\n\
|
| 52 |
exec code-server --disable-telemetry --bind-addr 0.0.0.0:8443 /workspace\n\
|
| 53 |
' > /start.sh && \
|
| 54 |
+
chmod +x /start.sh
|
| 55 |
|
| 56 |
# Expose ports for both services
|
| 57 |
EXPOSE 8443 11434
|