Update Dockerfile
Browse files- Dockerfile +24 -37
Dockerfile
CHANGED
|
@@ -3,46 +3,30 @@ FROM ubuntu:22.04
|
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
# ========================
|
| 6 |
-
#
|
| 7 |
# ========================
|
| 8 |
RUN apt update && apt install -y \
|
| 9 |
-
curl \
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
sudo \
|
| 14 |
-
unzip \
|
| 15 |
-
build-essential \
|
| 16 |
-
software-properties-common \
|
| 17 |
-
ca-certificates \
|
| 18 |
-
gnupg \
|
| 19 |
-
lsb-release \
|
| 20 |
-
python3 \
|
| 21 |
-
python3-pip \
|
| 22 |
-
python3-venv \
|
| 23 |
apt-transport-https \
|
| 24 |
-
&&
|
| 25 |
|
| 26 |
# ========================
|
| 27 |
-
# NODEJS
|
| 28 |
# ========================
|
| 29 |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
| 30 |
apt install -y nodejs
|
| 31 |
|
| 32 |
-
|
| 33 |
-
RUN npm install -g \
|
| 34 |
-
npm@latest \
|
| 35 |
-
yarn \
|
| 36 |
-
pnpm \
|
| 37 |
-
pm2 \
|
| 38 |
-
nodemon \
|
| 39 |
-
express-generator
|
| 40 |
|
| 41 |
# ========================
|
| 42 |
-
# PYTHON AI
|
| 43 |
# ========================
|
| 44 |
-
RUN pip3 install --upgrade pip
|
| 45 |
-
|
|
|
|
| 46 |
fastapi \
|
| 47 |
uvicorn \
|
| 48 |
flask \
|
|
@@ -50,31 +34,34 @@ RUN pip3 install --upgrade pip && \
|
|
| 50 |
numpy \
|
| 51 |
pandas \
|
| 52 |
transformers \
|
| 53 |
-
torch \
|
| 54 |
huggingface_hub \
|
| 55 |
datasets \
|
| 56 |
accelerate
|
| 57 |
|
| 58 |
-
#
|
|
|
|
|
|
|
| 59 |
RUN pip3 install "huggingface_hub[cli]"
|
| 60 |
|
| 61 |
# ========================
|
| 62 |
-
# CODE-SERVER (
|
| 63 |
# ========================
|
| 64 |
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 65 |
|
| 66 |
-
#
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
USER developer
|
| 70 |
WORKDIR /home/developer
|
| 71 |
|
| 72 |
# ========================
|
| 73 |
-
#
|
| 74 |
# ========================
|
| 75 |
EXPOSE 8080 3000 8000
|
| 76 |
|
| 77 |
-
# ========================
|
| 78 |
-
# START COMMAND
|
| 79 |
-
# ========================
|
| 80 |
CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "none"]
|
|
|
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
# ========================
|
| 6 |
+
# BASE SYSTEM
|
| 7 |
# ========================
|
| 8 |
RUN apt update && apt install -y \
|
| 9 |
+
curl wget git nano sudo unzip \
|
| 10 |
+
build-essential software-properties-common \
|
| 11 |
+
ca-certificates gnupg lsb-release \
|
| 12 |
+
python3 python3-pip python3-venv \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
apt-transport-https \
|
| 14 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
# ========================
|
| 17 |
+
# NODEJS
|
| 18 |
# ========================
|
| 19 |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
| 20 |
apt install -y nodejs
|
| 21 |
|
| 22 |
+
RUN npm install -g npm yarn pnpm pm2 nodemon express-generator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
# ========================
|
| 25 |
+
# PYTHON SAFE AI STACK
|
| 26 |
# ========================
|
| 27 |
+
RUN pip3 install --upgrade pip
|
| 28 |
+
|
| 29 |
+
RUN pip3 install \
|
| 30 |
fastapi \
|
| 31 |
uvicorn \
|
| 32 |
flask \
|
|
|
|
| 34 |
numpy \
|
| 35 |
pandas \
|
| 36 |
transformers \
|
|
|
|
| 37 |
huggingface_hub \
|
| 38 |
datasets \
|
| 39 |
accelerate
|
| 40 |
|
| 41 |
+
# ⚠️ Install torch separately (safer CPU version)
|
| 42 |
+
RUN pip3 install torch --index-url https://download.pytorch.org/whl/cpu
|
| 43 |
+
|
| 44 |
RUN pip3 install "huggingface_hub[cli]"
|
| 45 |
|
| 46 |
# ========================
|
| 47 |
+
# CODE-SERVER (FIXED)
|
| 48 |
# ========================
|
| 49 |
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 50 |
|
| 51 |
+
# ========================
|
| 52 |
+
# USER SETUP (FIXED)
|
| 53 |
+
# ========================
|
| 54 |
+
RUN useradd -m developer || true && \
|
| 55 |
+
echo "developer:developer" | chpasswd || true && \
|
| 56 |
+
groupadd sudo || true && \
|
| 57 |
+
usermod -aG sudo developer || true
|
| 58 |
|
| 59 |
USER developer
|
| 60 |
WORKDIR /home/developer
|
| 61 |
|
| 62 |
# ========================
|
| 63 |
+
# PORTS
|
| 64 |
# ========================
|
| 65 |
EXPOSE 8080 3000 8000
|
| 66 |
|
|
|
|
|
|
|
|
|
|
| 67 |
CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "none"]
|