Spaces:
Build error
Build error
Update Dockerfile
Browse files9 unmodified lines101112131415161718192021222324252627282 unmodified lines31323334359 unmodified lines# Create user and set up environmentRUN useradd -m -u 1000 userRUN --mount=type=secret,id=Access_key,mode=0444,required=true \git clone $(cat /run/secrets/Access_key) /app# Set proper permissions for the application directoriesWORKDIR /appRUN chown -R user:user /app && \mkdir -p /app/temp && \mkdir -p /app/uploads && \chown -R user:user /app/temp && \chown -R user:user /app/uploads && \chmod -R 755 /app && \chmod -R 777 /app/temp && \chmod -R 777 /app/uploads# Switch to user for pip installationsUSER user2 unmodified lines# Install Python dependenciesRUN pip install --no-cache-dir --upgrade -r requirements.txt# Start the applicationCMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]9 unmodified lines1011121314151617181920212223242526272 unmodified lines30313233343536379 unmodified lines# Create user and set up environmentRUN useradd -m -u 1000 user# Clone the repository and set up directoriesRUN --mount=type=secret,id=Access_key,mode=0444,required=true \git clone $(cat /run/secrets/Access_key) /app && \mkdir -p /app/temp /app/uploads /app/files && \chown -R user:user /app && \chmod -R 755 /app && \chmod -R 777 /app/temp && \chmod -R 777 /app/uploads && \chmod -R 777 /app/files# Set working directoryWORKDIR /app# Switch to user for pip installationsUSER user2 unmodified lines# Install Python dependenciesRUN pip install --no-cache-dir --upgrade -r requirements.txt# Expose port 7860EXPOSE 7860# Start the applicationCMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+13-11