mac9087 commited on
Commit
feee71f
·
verified ·
1 Parent(s): b451c1f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -14
Dockerfile CHANGED
@@ -17,28 +17,21 @@ RUN apt-get update && apt-get install -y \
17
  # Create output directory
18
  RUN mkdir -p outputs
19
 
20
- # Install PyTorch first separately (for better error reporting)
21
- RUN pip install --upgrade pip && \
22
- pip install --no-cache-dir torch==2.0.1 numpy==1.24.2
23
-
24
- # Install Jupyter-related dependencies needed by Shap-E
25
- RUN pip install --no-cache-dir ipywidgets jupyter
26
-
27
- # Install other Python dependencies
28
  COPY requirements.txt .
29
- RUN pip install --no-cache-dir -r requirements.txt
30
 
31
- # Install Shap-E from source with all dependencies
32
- RUN pip install --no-cache-dir "git+https://github.com/openai/shap-e.git@main"
33
-
34
- # Copy the Flask application
35
- COPY app.py .
36
 
37
  # Expose the port
38
  EXPOSE 7860
39
 
40
  # Set environment variables
41
  ENV PYTHONUNBUFFERED=1
 
42
 
43
  # Run the application with timeout set to 300 seconds for longer model loading
44
  CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "300", "app:app"]
 
17
  # Create output directory
18
  RUN mkdir -p outputs
19
 
20
+ # Copy application code
21
+ COPY app.py .
 
 
 
 
 
 
22
  COPY requirements.txt .
 
23
 
24
+ # Install Python dependencies - let Shap-E determine the correct versions
25
+ RUN pip install --upgrade pip && \
26
+ pip install --no-cache-dir -r requirements.txt && \
27
+ pip install --no-cache-dir "git+https://github.com/openai/shap-e.git@main"
 
28
 
29
  # Expose the port
30
  EXPOSE 7860
31
 
32
  # Set environment variables
33
  ENV PYTHONUNBUFFERED=1
34
+ ENV SHAPEE_NO_INTERACTIVE=1
35
 
36
  # Run the application with timeout set to 300 seconds for longer model loading
37
  CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "300", "app:app"]