serJD commited on
Commit
074235e
·
verified ·
1 Parent(s): 0164d8b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -0
Dockerfile CHANGED
@@ -1,10 +1,21 @@
 
1
  FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
2
 
 
 
 
 
 
 
 
3
  WORKDIR /app
4
 
 
5
  COPY requirements.txt requirements.txt
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY . /app
9
 
 
10
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use the official tiangolo/uvicorn-gunicorn-fastapi image
2
  FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
3
 
4
+ # Set the environment variable for the Speckle user data path
5
+ ENV SPECKLE_USERDATA_PATH=/app/speckle_data
6
+
7
+ # Create the directory for Speckle user data
8
+ RUN mkdir -p /app/speckle_data
9
+
10
+ # Set the working directory
11
  WORKDIR /app
12
 
13
+ # Copy the requirements file and install dependencies
14
  COPY requirements.txt requirements.txt
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # Copy the rest of the application code
18
  COPY . /app
19
 
20
+ # Run the application
21
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]