Segizu commited on
Commit
a48ccbf
·
1 Parent(s): fb1b5c7

notebook v1

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -11
Dockerfile CHANGED
@@ -1,18 +1,23 @@
1
- # Imagen base con soporte de CUDA
2
  FROM tensorflow/tensorflow:2.12.0-gpu
3
 
4
- # Crear directorio de trabajo
5
- WORKDIR /app
6
 
7
- # Copiar archivos de dependencias
8
- COPY requirements.txt .
 
 
 
 
 
 
9
 
10
- # Instalar dependencias
11
- RUN pip install --upgrade pip && \
12
- pip install -r requirements.txt
13
 
14
- # Copiar el notebook o app
15
  COPY . .
16
 
17
- # Comando por defecto (puede cambiarse según necesidad)
18
- CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--allow-root", "--NotebookApp.token=''", "--NotebookApp.password=''", "--no-browser"]
 
 
 
1
  FROM tensorflow/tensorflow:2.12.0-gpu
2
 
3
+ # Crear carpeta segura
4
+ WORKDIR /workspace
5
 
6
+ # Establecer variables necesarias para evitar errores en /.local
7
+ ENV HOME=/workspace
8
+ ENV JUPYTER_RUNTIME_DIR=/workspace/.jupyter_runtime
9
+ ENV JUPYTER_DATA_DIR=/workspace/.jupyter_data
10
+ ENV JUPYTER_CONFIG_DIR=/workspace/.jupyter_config
11
+
12
+ # Crear carpetas necesarias
13
+ RUN mkdir -p $JUPYTER_RUNTIME_DIR $JUPYTER_DATA_DIR $JUPYTER_CONFIG_DIR
14
 
15
+ # Copiar requerimientos y código
16
+ COPY requirements.txt .
17
+ RUN pip install --upgrade pip && pip install -r requirements.txt
18
 
 
19
  COPY . .
20
 
21
+ # Lanzar Jupyter Notebook sin contraseña ni token
22
+ CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--allow-root", "--NotebookApp.token=''", "--NotebookApp.password=''", "--NotebookApp.notebook_dir=/workspace", "--no-browser"]
23
+