forked from amun-ai/hypha
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
60 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,66 @@ | ||
FROM continuumio/miniconda3 | ||
|
||
# Set working directory | ||
WORKDIR /home | ||
RUN mkdir /home/bin && \ | ||
cd /home/bin && wget https://dl.min.io/server/minio/release/linux-amd64/minio && \ | ||
|
||
# Install MinIO server and client | ||
RUN mkdir -p /home/bin && \ | ||
cd /home/bin && \ | ||
wget https://dl.min.io/server/minio/release/linux-amd64/minio && \ | ||
wget https://dl.min.io/client/mc/release/linux-amd64/mc && \ | ||
chmod +x /home/bin/minio /home/bin/mc && \ | ||
chmod -R 777 /home | ||
RUN mkdir /.mc && \ | ||
|
||
# Create and set permissions for .mc directory | ||
RUN mkdir -p /.mc && \ | ||
chmod -R 777 /.mc | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
fonts-liberation\ | ||
libasound2\ | ||
libatk-bridge2.0-0\ | ||
libatk1.0-0\ | ||
libatspi2.0-0\ | ||
libcairo2\ | ||
libcups2\ | ||
libdbus-1-3\ | ||
libdrm2\ | ||
libgbm1\ | ||
libglib2.0-0\ | ||
libgtk-3-0\ | ||
libnspr4\ | ||
libnss3\ | ||
libpango-1.0-0\ | ||
libx11-6\ | ||
libxcb1\ | ||
libxcomposite1\ | ||
libxdamage1\ | ||
libxext6\ | ||
libxfixes3\ | ||
libxrandr2 | ||
RUN conda update pip -y | ||
|
||
# Install necessary packages | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
fonts-liberation \ | ||
libasound2 \ | ||
libatk-bridge2.0-0 \ | ||
libatk1.0-0 \ | ||
libatspi2.0-0 \ | ||
libcairo2 \ | ||
libcups2 \ | ||
libdbus-1-3 \ | ||
libdrm2 \ | ||
libgbm1 \ | ||
libglib2.0-0 \ | ||
libgtk-3-0 \ | ||
libnspr4 \ | ||
libnss3 \ | ||
libpango-1.0-0 \ | ||
libx11-6 \ | ||
libxcb1 \ | ||
libxcomposite1 \ | ||
libxdamage1 \ | ||
libxext6 \ | ||
libxfixes3 \ | ||
libxrandr2 && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Update conda and install dependencies | ||
RUN conda update -n base -c defaults conda -y && \ | ||
conda install pip -y | ||
|
||
# Copy all files to the container | ||
ADD . . | ||
RUN pip install .[server-apps] | ||
# RUN pip install --no-cache-dir . | ||
RUN pip install --no-cache-dir playwright && playwright install | ||
EXPOSE 3000 | ||
|
||
# Install Python dependencies | ||
RUN pip install .[server-apps] --no-cache-dir && \ | ||
pip install playwright --no-cache-dir && \ | ||
playwright install | ||
|
||
# Add user and switch to non-root user | ||
RUN useradd -u 8877 hypha | ||
USER hypha | ||
|
||
# Expose port | ||
EXPOSE 9520 | ||
|
||
# Define the command to run the application | ||
CMD ["python", "-m", "hypha.server", "--host=0.0.0.0", "--port=9520"] |