asv7j commited on
Commit
5466fef
·
verified ·
1 Parent(s): 4248d19

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -13
Dockerfile CHANGED
@@ -1,18 +1,30 @@
1
- # Use Python image as the base
2
- FROM python:3.9-slim
3
 
4
- # Set working directory in the container
5
- WORKDIR /app
 
 
 
 
6
 
7
- # Copy the Python script and Bash script into the container
8
- COPY server.py /app/server.py
9
- COPY execute_command.sh /app/execute_command.sh
 
 
 
10
 
11
- # Install Flask and its dependencies
12
- RUN pip install flask
 
 
13
 
14
- # Expose the Flask port
15
- EXPOSE 5000
16
 
17
- # Set the entry point to start the Flask server
18
- CMD ["python", "server.py"]
 
 
 
 
1
+ # Use the official Python image as base
2
+ FROM python:3.8-slim
3
 
4
+ # Set environment variables
5
+ ENV PYTHONUNBUFFERED=1 \
6
+ LANG=C.UTF-8 \
7
+ LC_ALL=C.UTF-8 \
8
+ DEBIAN_FRONTEND=noninteractive \
9
+ TZ=UTC
10
 
11
+ # Install necessary system dependencies
12
+ RUN apt-get update && \
13
+ apt-get install -y --no-install-recommends \
14
+ build-essential \
15
+ git \
16
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
17
 
18
+ # Install Jupyter Notebook and Jupyter Lab
19
+ RUN pip install --no-cache-dir \
20
+ notebook \
21
+ jupyterlab
22
 
23
+ # Expose port 8888 for Jupyter Notebook
24
+ EXPOSE 8888
25
 
26
+ # Create a directory for storing Jupyter Notebooks
27
+ WORKDIR /notebooks
28
+
29
+ # Start Jupyter Notebook when the container starts
30
+ CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]