startrz commited on
Commit
c9d1147
·
verified ·
1 Parent(s): 374a2a3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -9
Dockerfile CHANGED
@@ -1,13 +1,36 @@
1
- FROM docker.all-hands.dev/all-hands-ai/openhands:0.13
 
2
 
3
- ENV SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.13-nikolaik
 
 
4
 
5
- # Fix permissions for entrypoint script
6
- USER root
7
- RUN find / -name entrypoint.sh 2>/dev/null | xargs chmod +x
 
 
 
 
8
 
9
- # Switch back to non-root user if needed
10
- # USER 1000
11
 
12
- # Expose port
13
- EXPOSE 3000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a base image that includes Python and necessary system dependencies
2
+ FROM nikolaik/python-nodejs:python3.10-nodejs20
3
 
4
+ # Set environment variables
5
+ ENV PORT=7860
6
+ ENV RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.13-nikolaik
7
 
8
+ # Install system dependencies
9
+ RUN apt-get update && apt-get install -y \
10
+ build-essential \
11
+ curl \
12
+ software-properties-common \
13
+ git \
14
+ && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Create and set working directory
17
+ WORKDIR /app
18
 
19
+ # Copy application files
20
+ COPY . /app/
21
+
22
+ # Install Python dependencies
23
+ RUN pip install --no-cache-dir -r requirements.txt
24
+
25
+ # Install Node.js dependencies
26
+ RUN npm install
27
+
28
+ # Expose the port Hugging Face Spaces expects
29
+ EXPOSE 7860
30
+
31
+ # Set up healthcheck
32
+ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
33
+ CMD curl -f http://localhost:7860/ || exit 1
34
+
35
+ # Command to run the application
36
+ CMD ["python", "app.py"]