Skip to content

Commit

Permalink
add docker file for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
SilasK committed Dec 17, 2024
1 parent 8914ede commit 81d03f1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Start with the Miniconda base image
FROM continuumio/miniconda3:24.9.2-0

# Set the working directory in the container
WORKDIR /main

# Copy the environment file and project code
COPY atlasenv.yml .

# Create a user with a specific UID and GID
RUN groupadd -g 1000 atlasgroup && \
useradd -m -u 1000 -g atlasgroup -s /bin/bash atlasuser

# Set the HOME environment variable
ENV HOME=/home/atlasuser

# Change ownership of the home directory
RUN chown -R atlasuser:atlasgroup $HOME

# Switch to the new user
USER atlasuser

# Create and activate the environment
RUN conda env create -n atlas -f atlasenv.yml && \
conda clean -afy && \
echo "source activate atlas" > ~/.bashrc

# Set the working directory
WORKDIR /main


# Set the default command
CMD ["bash"]
1 change: 1 addition & 0 deletions docker_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker run -it --name atlas-debug -v $(pwd):/main atlas-debug

0 comments on commit 81d03f1

Please sign in to comment.