Spaces:
Runtime error
Runtime error
File size: 1,159 Bytes
a937dd1 85dc932 a937dd1 85dc932 1da7eae a937dd1 de50a4d 4c3687d bc71408 a937dd1 61b9c1d 1da7eae a937dd1 85dc932 de50a4d a937dd1 4c3687d 61b9c1d 9831863 bc71408 de50a4d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | # Use an official Python image from Docker Hub
FROM python:3.9-slim
# Set the working directory inside the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && \
apt-get install -y \
git \
unzip \
curl \
xz-utils \
libssl-dev \
libreadline-dev \
libyaml-dev \
libsqlite3-dev \
sqlite3 \
libbz2-dev \
libgdbm-dev \
libncurses5-dev \
libncursesw5-dev \
libffi-dev \
liblzma-dev \
libmagic-dev \
make \
clang \
cmake \
xcode-select \
&& rm -rf /var/lib/apt/lists/*
# Install Fastlane
RUN curl -sL https://dl.bintray.com/fastlane/fastlane/install | bash
# Create directories with write permissions
RUN mkdir -p /app/icons /app/builds && \
chmod -R 777 /app/icons /app/builds
# Copy the FastAPI app files to the container
COPY . /app
# Install FastAPI and Uvicorn
RUN pip install --no-cache-dir -r requirements.txt
# Expose the port the app will run on
EXPOSE 8000
# Run the app under root to avoid permission issues in the app folder
USER root
# Start the FastAPI app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|