airssss commited on
Commit
8559d57
·
verified ·
1 Parent(s): f12bf40

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +73 -0
Dockerfile ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.9 as the base image
2
+ FROM python:3.9
3
+ USER root
4
+ # Set environment variables
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Install necessary packages
8
+ RUN apt-get update && \
9
+ apt-get install -y \
10
+ curl \
11
+ sudo \
12
+ build-essential \
13
+ default-jdk \
14
+ default-jre \
15
+ g++ \
16
+ gcc \
17
+ libzbar0 \
18
+ fish \
19
+ ffmpeg \
20
+ nmap \
21
+ ca-certificates \
22
+ curl \
23
+ docker
24
+
25
+ # Install Node.js (LTS version)
26
+ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && \
27
+ apt-get install -y nodejs
28
+
29
+ # Install code-server
30
+ RUN curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.23.0-rc.2
31
+
32
+ # Install ollama
33
+ RUN curl -fsSL https://ollama.com/install.sh | sh
34
+
35
+ # Create a user to run code-server
36
+ RUN useradd -m -s /bin/bash coder && \
37
+ echo 'coder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
38
+
39
+ # Create and set the working directory
40
+ RUN mkdir -p /home/coder/genz/roop
41
+ WORKDIR /home/coder/genz/roop
42
+
43
+ # Clone the roop repository
44
+ RUN git clone https://github.com/s0md3v/roop.git .
45
+
46
+ # Change ownership and permissions of the roop directory and its contents
47
+ RUN chown -R coder:coder /home/coder/genz/roop && \
48
+ chmod -R u+rwx /home/coder/genz/roop
49
+
50
+ # Create code-server configuration directory
51
+ RUN mkdir -p /home/coder/.local/share/code-server/User
52
+
53
+ # Add settings.json to enable dark mode
54
+ RUN echo '{ \
55
+ "workbench.colorTheme": "Default Dark Modern", \
56
+ "telemetry.enableTelemetry": true, \
57
+ "telemetry.enableCrashReporter": true \
58
+ }' > /home/coder/.local/share/code-server/User/settings.json
59
+
60
+
61
+
62
+ # Install Python extension for code-server
63
+ #RUN sudo -u coder code-server --install-extension ms-python.python
64
+
65
+ # Expose the default code-server port
66
+ EXPOSE 8080
67
+
68
+ # Switch to the coder user for running code-server
69
+ USER root
70
+ WORKDIR /home/coder/genz
71
+
72
+ # Start code-server with authentication
73
+ CMD ["sh", "-c", "code-server --bind-addr 0.0.0.0:7860 --auth none"]