Add patient management, deployment scripts, and Docker fixes
This commit is contained in:
@@ -27,7 +27,7 @@ WORKDIR /app
|
||||
RUN pip install --no-cache-dir --upgrade pip && \
|
||||
pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu
|
||||
|
||||
# Copy and install requirements (from brace-generator folder)
|
||||
# Copy and install requirements
|
||||
COPY brace-generator/requirements.txt /app/requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
@@ -35,8 +35,16 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY scoliovis-api/requirements.txt /app/requirements-scoliovis.txt
|
||||
RUN pip install --no-cache-dir -r requirements-scoliovis.txt || true
|
||||
|
||||
# Copy brace-generator code
|
||||
COPY brace-generator/ /app/brace_generator/server_DEV/
|
||||
# Create brace_generator package structure
|
||||
RUN mkdir -p /app/brace_generator
|
||||
|
||||
# Copy brace-generator code as a package
|
||||
COPY brace-generator/*.py /app/brace_generator/
|
||||
COPY brace-generator/__init__.py /app/brace_generator/__init__.py
|
||||
|
||||
# Also keep server_DEV structure for compatibility
|
||||
RUN mkdir -p /app/brace_generator/server_DEV
|
||||
COPY brace-generator/*.py /app/brace_generator/server_DEV/
|
||||
|
||||
# Copy scoliovis-api
|
||||
COPY scoliovis-api/ /app/scoliovis-api/
|
||||
@@ -44,8 +52,8 @@ COPY scoliovis-api/ /app/scoliovis-api/
|
||||
# Copy templates
|
||||
COPY templates/ /app/templates/
|
||||
|
||||
# Set Python path
|
||||
ENV PYTHONPATH=/app:/app/brace_generator/server_DEV:/app/scoliovis-api
|
||||
# Set Python path - include both locations
|
||||
ENV PYTHONPATH=/app:/app/scoliovis-api
|
||||
|
||||
# Environment variables
|
||||
ENV HOST=0.0.0.0
|
||||
@@ -61,8 +69,8 @@ RUN mkdir -p /tmp/brace_generator /app/data/uploads /app/data/outputs
|
||||
EXPOSE 8002
|
||||
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
||||
CMD curl -f http://localhost:8002/health || exit 1
|
||||
|
||||
# Run the server
|
||||
# Run the server from the brace_generator package
|
||||
CMD ["python", "-m", "uvicorn", "brace_generator.server_DEV.app:app", "--host", "0.0.0.0", "--port", "8002"]
|
||||
|
||||
Reference in New Issue
Block a user